You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<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
556
559
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:-->
558
561
559
562
<ul>
560
563
<li>'column-count'
@@ -564,6 +567,9 @@ <h2>The number and width of columns</h2>
564
567
<p>A third property, 'columns', is a shorthand property which sets both
565
568
'column-width' and 'column-count'.
566
569
570
+
<p>Other factors, such as the explicit column breaks and height
571
+
constraints, may influence the actual numer and width of columns.
572
+
567
573
568
574
<h3id='cw'>'column-width'</h3>
569
575
@@ -772,14 +778,20 @@ <h3>Pseudo-algorithm</h3>
772
778
in the pseudo-algorithm: U is the used width of the multi-column
773
779
element.
774
780
781
+
782
+
775
783
<pclass=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.
776
784
785
+
<!--
777
786
<p>Two assumptions are being made by the pseudo-algorithm:
778
787
779
788
<ul>
780
789
<li>that the block direction is unconstrained
781
790
<li>that no column breaks are added through style sheets
782
791
</ul>
792
+
-->
793
+
794
+
783
795
784
796
<p>The <code>floor(X)</code> function returns the largest integer Y ≤ X.
785
797
@@ -804,6 +816,43 @@ <h3>Pseudo-algorithm</h3>
804
816
<p>In paged media, user agents may perform this calculation on a
805
817
per-page basis.
806
818
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
+
<divclass=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
+
<div style="width: 40em; columns: 20em">
831
+
<p>one
832
+
<p>two
833
+
<p>three
834
+
</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
+
<divclass=example>
843
+
<p>The actual column-count may be lower than the used column-count. Consider this example:
0 commit comments