Skip to content

Commit 29b1f61

Browse files
committed
[css-multicol] Initial draft of block direction overflow
1 parent 15faddb commit 29b1f61

File tree

1 file changed

+122
-4
lines changed

1 file changed

+122
-4
lines changed

css-multicol-2/Overview.bs

+122-4
Original file line numberDiff line numberDiff line change
@@ -777,6 +777,38 @@ The number and width of columns</h2>
777777
the column gap and the width of the multicol container (assuming horizontal text)
778778
must also be specified.
779779

780+
<h3 id='ch'>The Block Size of Columns: the 'column-height' property</h3>
781+
782+
<pre class=propdef>
783+
Name: column-height
784+
Value: auto | <<length [0,&infin;]>>
785+
Initial: auto
786+
Applies to: <a>block containers</a> except <a>table wrapper boxes</a>
787+
Inherited: no
788+
Percentages: N/A
789+
Computed value: the keyword ''auto'' or an absolute length
790+
Animation type: by computed value type
791+
</pre>
792+
793+
This property describes the height of columns in multicol containers.
794+
795+
<dl dfn-type=value dfn-for=column-height>
796+
<dt><dfn>auto</dfn></dt>
797+
<dd>
798+
means that the column height will be determined by the amount of content
799+
and other properties.
800+
801+
<dt><dfn><<length [0,&infin;]>></dfn>
802+
<dd>
803+
describes the desired column height.
804+
Negative values are not allowed.
805+
</dd>
806+
</dl>
807+
808+
If you set 'column-height' and 'height' on a multicol container,
809+
you may end up with some additional space.
810+
The properties defined in the [[CSS-ALIGN]] specification detail how to deal with it.
811+
780812
<h3 id='cc'>The Number of Columns: the 'column-count' property</h3>
781813

782814
<pre class=propdef>
@@ -835,14 +867,87 @@ The number and width of columns</h2>
835867
<pre highlight="css">body { column-count: 3 }</pre>
836868
</div>
837869

838-
<h3 id="columns">The 'column-width' and 'column-count' Shorthand: The 'columns' Property</h3>
870+
<h3 id='cwr'>The overflow direction in continuous media: the 'column-wrap' property</h3>
871+
872+
<pre class=propdef>
873+
Name: column-wrap
874+
Value: nowrap | wrap
875+
Initial: nowrap
876+
Applies to: multicol containers
877+
Inherited: no
878+
Percentages: n/a
879+
Computed value: specified keyword
880+
Canonical order: per grammar
881+
Animation type: discrete
882+
</pre>
883+
884+
The column-wrap property controls the behavior of overflow columns in continuous media.
885+
The property only takes effect if 'column-height' is not 'auto',
886+
and there is more content than will fit in a single row of columns at the specified 'column-height'.
887+
888+
<dl dfn-type=value dfn-for=column-wrap>
889+
<dt><dfn>nowrap</dfn>
890+
<dd>
891+
Overflow columns are created in the inline direction.
892+
893+
<dt><dfn>wrap</dfn>
894+
<dd>
895+
Overflow columns create a new multicol row in the block direction.
896+
</dd>
897+
</dl>
898+
899+
<div class="example">
900+
Example:
901+
902+
<pre highlight="css">
903+
body {
904+
column-count: 3;
905+
column-wrap: nowrap;
906+
column-height: 10em;
907+
}
908+
</pre>
909+
910+
This CSS creates a set of three columns.
911+
If there is more content than would fit in the 10em height of these columns,
912+
new columns are created in the inline direction
913+
even if there is room in the multicol container.
914+
915+
</div>
916+
917+
<div class="example">
918+
Example:
919+
920+
<pre highlight="css">
921+
body {
922+
column-count: 3;
923+
column-wrap: wrap;
924+
column-height: 10em;
925+
}
926+
</pre>
927+
928+
This CSS creates a set of three columns.
929+
If there is more content than would fit in the 10em height of these columns,
930+
rather than overflowing in the inline direction,
931+
a new row of columns is created in the block direction, again at a max column-height of 10em.
932+
New rows repeat until all content is displayed.
933+
</div>
934+
935+
Issue(11754): The addition of this property is as yet unresolved.
936+
937+
Issue(11754): What happens if you set a height on the multicol container, 'column-wrap: wrap' but no 'column-height'?
938+
Options are 1: The 'column-wrap' property is ignored. 2: 'column-height: auto' resolves to the available space
939+
in the multicol container and new rows of that size are created for the overflow,
940+
thus honoring the 'wrap' value.
941+
942+
<h3 id="columns">The 'column-width', 'column-count', 'column-height', and 'column-wrap' Shorthand: The 'columns' Property</h3>
839943

840944
<pre class="propdef shorthand">
841945
Name: columns
842-
Value: <<'column-width'>> || <<'column-count'>>
946+
Value: <<'column-width'>> || <<'column-count'>> || <<'column-height'>> || <<'column-wrap'>>
843947
</pre>
844948

845-
This is a shorthand property for setting 'column-width' and 'column-count'.
949+
This is a shorthand property for setting 'column-width', 'column-count',
950+
'column-height', and 'column-wrap'.
846951
Omitted values are set to their initial values.
847952

848953
<div class="example">
@@ -855,6 +960,8 @@ The number and width of columns</h2>
855960
columns: 2 auto; /* column-width: auto; column-count: 2 */
856961
columns: auto; /* column-width: auto; column-count: auto */
857962
columns: auto auto; /* column-width: auto; column-count: auto */
963+
columns: 12em 14em; /* column-width: 12em; column-height: 14em; */
964+
columns: 12em 14em wrap; /* column-width: 12em; column-height: 14em; column-wrap: wrap; */
858965
</pre>
859966
</div>
860967

@@ -1141,6 +1248,15 @@ without caring about the <em>contents</em>.
11411248
multicol-gap-animation-003.html
11421249
</wpt>
11431250

1251+
<h3 id='cg'>Gutters Between Rows: the 'row-gap' property</h3>
1252+
1253+
The 'row-gap' property is defined in [[!CSS3-ALIGN]].
1254+
1255+
In a [=multi-column formatting context=]
1256+
the used value of ''row-gap/normal'' for the 'row-gap' property is ''1em''.
1257+
If there is a rule between rows,
1258+
it will appear in the middle of the gap.
1259+
11441260
<h3 id='crc'>The Color of Column Rules: the
11451261
'column-rule-color' property</h3>
11461262

@@ -2149,7 +2265,9 @@ This appendix is <em>informative</em>.
21492265
<h3 id="changes-from-multicol1">Changes from the <a href="https://www.w3.org/TR/2024/CR-css-multicol-1-20240516/">Candidate Recommendation (CR) of CSS-MULTICOL-1 of 16 May 2024</a></h3>
21502266

21512267
<ul>
2152-
<li>Adds the the ''::column'' pseudo-element. <a href="https://github.com/w3c/csswg-drafts/issues/10715#issuecomment-2379924982">Resolved 27 Sep 2024</a>.</li>
2268+
<li>Adds a draft of proposed ''column-wrap'' property.</li>
2269+
<li>Adds the ''column-height'' property. <a href="https://github.com/w3c/csswg-drafts/issues/2923#issuecomment-2625930018">Resolved 30 Jan 2025</a>.
2270+
<li>Adds the ''::column'' pseudo-element. <a href="https://github.com/w3c/csswg-drafts/issues/10715#issuecomment-2379924982">Resolved 27 Sep 2024</a>.</li>
21532271
<li>Adds a draft of proposed <css>&lt;integer></css> and <css>auto</css> values for ''column-span''.</li>
21542272
</ul>
21552273

0 commit comments

Comments
 (0)