Skip to content

Commit 6bb3cee

Browse files
author
howcome
committed
revising examples
2 parents 437a4a1 + 87d3ccd commit 6bb3cee

1 file changed

Lines changed: 52 additions & 3 deletions

File tree

css-multicol/Overview.src.html

Lines changed: 52 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -551,10 +551,13 @@ <h2>The multi-column model</h2>
551551

552552
<h2>The number and width of columns</h2>
553553

554-
<p>Finding the number and width of columns is fundamental when
555-
laying out multi-column content. When the block direction
554+
<p>Finding the number and width of columns is fundamental when laying
555+
out multi-column content. These properties are used to set the number
556+
and width of columns:
557+
558+
<!--When the block direction
556559
is unconstrained and no column breaks are added through style sheets,
557-
these two properties determine the outcome:
560+
these two properties determine the outcome:-->
558561

559562
<ul>
560563
<li>'column-count'
@@ -564,6 +567,9 @@ <h2>The number and width of columns</h2>
564567
<p>A third property, 'columns', is a shorthand property which sets both
565568
'column-width' and 'column-count'.
566569

570+
<p>Other factors, such as the explicit column breaks and height
571+
constraints, may influence the actual numer and width of columns.
572+
567573

568574
<h3 id='cw'>'column-width'</h3>
569575

@@ -772,14 +778,20 @@ <h3>Pseudo-algorithm</h3>
772778
in the pseudo-algorithm: U is the used width of the multi-column
773779
element.
774780

781+
782+
775783
<p class=note>The used width U of the multi-column element can depend on the element's contents, in which case it also depends on the computed values of the 'column-count' and 'column-width' properties. This specification does not define how U is calculated. Another module (probably the Basic Box Model [[CSS3BOX]] or the Intrinsic & Extrinsic Sizing Module [[CSS3-SIZING]]) is expected to define this.
776784

785+
<!--
777786
<p>Two assumptions are being made by the pseudo-algorithm:
778787
779788
<ul>
780789
<li>that the block direction is unconstrained
781790
<li>that no column breaks are added through style sheets
782791
</ul>
792+
-->
793+
794+
783795

784796
<p>The <code>floor(X)</code> function returns the largest integer Y &le; X.
785797

@@ -804,6 +816,43 @@ <h3>Pseudo-algorithm</h3>
804816
<p>In paged media, user agents may perform this calculation on a
805817
per-page basis.
806818

819+
<p>The used value for for 'column-count' is calculated without
820+
regard for explicit column breaks or constrained column lengths,
821+
while the actual value takes these into consideration.
822+
823+
<div class=example>
824+
<p>In this example, the actual column-count is higher than the used column-count due to explicit column breaks:
825+
826+
<pre>
827+
div { width: 40em; columns: 20em }
828+
p { break-after: column }
829+
830+
&lt;div style="width: 40em; columns: 20em">
831+
&lt;p>one
832+
&lt;p>two
833+
&lt;p>three
834+
&lt;/div>
835+
</pre>
836+
837+
<p>The used column-count is 2 and the actual column-count is 3.
838+
839+
</div>
840+
841+
842+
<div class=example>
843+
<p>The actual column-count may be lower than the used column-count. Consider this example:
844+
845+
<pre>
846+
&lt;div style="width: 80em; height: 10em; columns: 20em; column-gap: 0; column-fill: auto;">
847+
foo
848+
&lt;/div>
849+
</pre>
850+
851+
<p>The computed column-count is auto, the used column-count is 4, and the actual column-count is 1.
852+
</div>
853+
854+
855+
807856

808857

809858
<h3>Stacking context</h3>

0 commit comments

Comments
 (0)