Skip to content

Commit 41134ea

Browse files
author
howcome
committed
machine-generated version
1 parent aa41389 commit 41134ea

1 file changed

Lines changed: 192 additions & 28 deletions

File tree

css-multicol/Overview.html

Lines changed: 192 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -507,12 +507,12 @@ <h2 id=the-multi-column-model><span class=secno>2. </span>The multi-column
507507

508508
<div class=gap style="left: 325px"></div>
509509
</div>
510+
<!--
511+
<p>To illustrate the effects of the various properties described in
512+
this specification, variations on a sample document will be used. Here
513+
is the source code of the sample document:
510514
511-
<p>To illustrate the effects of the various properties described in this
512-
specification, variations on a sample document will be used. Here is the
513-
source code of the sample document:
514-
515-
<pre class=html>
515+
<pre class="html">
516516
&lt;html>
517517
&lt;style type="text/css">
518518
div {
@@ -536,10 +536,11 @@ <h2 id=the-multi-column-model><span class=secno>2. </span>The multi-column
536536
&lt;/html>
537537
</pre>
538538
539-
<p>The nonsensical text in the example is the English alphabet which shows
540-
how text flows from one column to another. To simplify the visualization,
541-
the textual content of the different examples vary slightly.
542-
</div>
539+
<p>The nonsensical text in the example is the English alphabet which
540+
shows how text flows from one column to another. To simplify the
541+
visualization, the textual content of the different examples vary
542+
slightly.
543+
--></div>
543544

544545
<p>Column boxes are block container boxes. That is, column boxes behave
545546
like block-level, table cell, and inline-block boxes as per CSS 2.1,
@@ -1036,7 +1037,7 @@ <h3 id=pseudo-algorithm><span class=secno>3.4. </span>Pseudo-algorithm</h3>
10361037

10371038
<p>The used value for ‘<a href="#column-count"><code
10381039
class=property>column-count</code></a>’ is calculated without regard for
1039-
explicit column breaks or constrained column lengths, while the actual
1040+
explicit column breaks or constrained column heights, while the actual
10401041
value takes these into consideration.
10411042

10421043
<div class=example>
@@ -1089,9 +1090,8 @@ <h2 id=column-gaps-and-rules><span class=secno>4. </span>Column gaps and
10891090

10901091
<p>Column gaps and rules are placed between columns in the same multicol
10911092
element. The length of the column gaps and column rules is equal to the
1092-
length of the columns. Column gaps take up space. That is, column gaps
1093-
will push apart content in adjacent columns (within the same multicol
1094-
element).
1093+
column height. Column gaps take up space. That is, column gaps will push
1094+
apart content in adjacent columns (within the same multicol element).
10951095

10961096
<p>A column rule is drawn in the middle of the column gap with the
10971097
endpoints at opposing content edges of the multicol element. Column rules
@@ -2085,13 +2085,11 @@ <h2 id=filling-columns><span class=secno>7. </span>Filling columns</h2>
20852085

20862086
<p>There are two strategies for filling columns: columns can either be
20872087
balanced, or not. If columns are balanced, user agents should try to
2088-
minimize the variation in content between columns, while also trying to
2089-
minimize the overflow content. If columns are not balanced, they are
2090-
filled sequentially; some columns may end up partially filled, or with no
2091-
content at all. In any case, user agents must honor forced page breaks and
2092-
should try to honor ‘<code class=property>widows</code>’, ‘<code
2093-
class=property>orphans</code>’ and other properties that may affect
2094-
column lengths.
2088+
minimize variations in column height, while honoring forced breaks,
2089+
<code class=property>widows</code>’ and ‘<code
2090+
class=property>orphans</code>’, and other properties that may affect
2091+
column heights. If columns are not balanced, they are filled sequentially;
2092+
some columns may end up partially filled, or with no content at all.
20952093

20962094
<h3 id=cf><span class=secno>7.1. </span><a href="#column-fill"><code
20972095
class=property>column-fill</code></a></h3>
@@ -2149,11 +2147,17 @@ <h3 id=cf><span class=secno>7.1. </span>‘<a href="#column-fill"><code
21492147
<dl>
21502148
<dt>balance
21512149

2152-
<dd>Balance content equally between columns, if possible.
2150+
<dd>Balance content equally between columns, as far as possible. In paged
2151+
media, only the last page is balanced.
2152+
2153+
<dt>balance-all
2154+
2155+
<dd>Balance content equally between columns, as far as possible. In paged
2156+
media, all pages are balanced.
21532157

21542158
<dt>auto
21552159

2156-
<dd>Fills columns sequentially.
2160+
<dd>fill columns sequentially
21572161
</dl>
21582162
<!--
21592163
<p>In continuous media, this property will only be consulted if the
@@ -2162,22 +2166,182 @@ <h3 id=cf><span class=secno>7.1. </span>‘<a href="#column-fill"><code
21622166
-->
21632167

21642168
<p>In continuous media, this property does not have any effect in overflow
2165-
columns (see below). <!--
2169+
columns. <!--
21662170
<p>In paged media, this property will only have
21672171
effect on the last page the multicol element appears on.
21682172
-->
21692173

2174+
<div class=example>
2175+
<p>In this example, an article only has one short paragraph which fits on
2176+
three lines. The three lines are displayed in three different columns due
2177+
to column balancing.
2178+
2179+
<pre>
2180+
article { width: 60em; height: auto; columns: 4; column-fill: balance }
2181+
</pre>
2182+
2183+
<div class=cols style="width: 675px; height: 25px">
2184+
<div class=col style="">
2185+
<p> Ab cde fgh i jkl. Mno<br>
2186+
</div>
2187+
2188+
<div class=col style="left: 175px">
2189+
<p>pqr stu vw xyz. A bc
2190+
</div>
2191+
2192+
<div class=col style="left: 350px">
2193+
<p>def g hij klm.
2194+
</div>
2195+
2196+
<div class=col style="left: 525px"></div>
2197+
2198+
<div class=gap style="left: 150px"></div>
2199+
2200+
<div class=gap style="left: 325px"></div>
2201+
2202+
<div class=gap style="left: 500px"></div>
2203+
</div>
2204+
</div>
2205+
2206+
<div class=example>
2207+
<p>In this example, column balancing is turned off:
2208+
2209+
<pre>
2210+
article { width: 60em; height: auto; columns: 4; column-fill: auto }
2211+
</pre>
2212+
2213+
<p>As a result, the first column is filled with all content:
2214+
2215+
<div class=cols style="width: 675px; height: 60px">
2216+
<div class=col style="">
2217+
<p> Ab cde fgh i jkl. Mno<br>
2218+
pqr stu vw xyz. A bc<br>
2219+
def g hij klm.
2220+
</div>
2221+
2222+
<div class=col style="left: 175px"></div>
2223+
2224+
<div class=col style="left: 350px"></div>
2225+
2226+
<div class=col style="left: 525px"></div>
2227+
2228+
<div class=gap style="left: 150px"></div>
2229+
2230+
<div class=gap style="left: 325px"></div>
2231+
2232+
<div class=gap style="left: 500px"></div>
2233+
</div>
2234+
</div>
2235+
2236+
<div class=example>
2237+
<p>In this example, an article has two paragraphs: first a long one, then
2238+
a shorter one. This code is applied:
2239+
2240+
<pre>
2241+
article { width: 60em; height: auto; columns: 4; column-fill: balance }
2242+
p { break-after: column }
2243+
</pre>
2244+
2245+
<p>The shortest column height possible contains five lines of text. After
2246+
the column height has been established, columns are filled sequentially.
2247+
As a result, the third column is as high as the first two columns, while
2248+
the last column ends up being significantly shorter.
2249+
2250+
<div class=cols style="width: 675px; height: 100px">
2251+
<div class=col style="">
2252+
<p> Ab cde fgh i jkl. Mno<br>
2253+
pqr stu vw xyz. A bc<br>
2254+
def g hij klm nopqrs<br>
2255+
tuv wxy z. Abc de fg<br>
2256+
hi jklmno. Pqrstu vw<br>
2257+
</div>
2258+
2259+
<div class=col style="left: 175px">
2260+
<p> x yz. Abc def ghi jkl.<br>
2261+
M nop qrst uv wx yz.<br>
2262+
Ab cde fgh i jkl. Mno<br>
2263+
pqr stu vw xyz. A bc<br>
2264+
def g hij klm.
2265+
</div>
2266+
2267+
<div class=col style="left: 350px">
2268+
<p> Ab cde fgh i jkl. Mno<br>
2269+
pqr stu vw xyz. A bc<br>
2270+
def g hij klm nopqrs<br>
2271+
tuv wxy z. Abc de fg<br>
2272+
hi jklmno. Pqrstu vw<br>
2273+
</div>
2274+
2275+
<div class=col style="left: 525px">
2276+
<p> x yz. Abc def ghi jkl.<br>
2277+
M nop qrst uv wx yz.
2278+
</div>
2279+
2280+
<div class=gap style="left: 150px"></div>
2281+
2282+
<div class=gap style="left: 325px"></div>
2283+
2284+
<div class=gap style="left: 500px"></div>
2285+
</div>
2286+
</div>
2287+
2288+
<div class=example>
2289+
<pre>
2290+
article { width: 60em; height: auto; columns: 4; column-fill: balance }
2291+
</pre>
2292+
2293+
<p>In this example, an article starts with an unbreakable figure which
2294+
sets the column height. Subsequent content is filled sequentially into
2295+
the remaining columns:
2296+
2297+
<div class=cols style="width: 675px; height: 140px">
2298+
<div class=col style="">
2299+
<p>
2300+
</div>
2301+
2302+
<div class=col style="left: 175px">
2303+
<p> Ab cde fgh i jkl. Mno<br>
2304+
pqr stu vw xyz. A bc<br>
2305+
def g hij klm nopqrs<br>
2306+
tuv wxy z. Abc de fg<br>
2307+
hi jklmno. Pqrstu vw<br>
2308+
x yz. Abc def ghi jkl.<br>
2309+
M nop qrst uv wx yz.<br>
2310+
</div>
2311+
2312+
<div class=col style="left: 350px">
2313+
<p> Ab cde fgh i jkl. Mno<br>
2314+
pqr stu vw xyz. A bc<br>
2315+
def g hij klm nopqrs<br>
2316+
tuv wxy z. Abc de fg<br>
2317+
hi jklmno.
2318+
</div>
2319+
2320+
<div class=col style="left: 525px"></div>
2321+
2322+
<div class=rep style="top: 0; width: 150px; height: 140px"></div>
2323+
2324+
<div class=gap style="left: 150px"></div>
2325+
2326+
<div class=gap style="left: 325px"></div>
2327+
2328+
<div class=gap style="left: 500px"></div>
2329+
</div>
2330+
</div>
2331+
21702332
<h2 id=overflow><span class=secno>8. </span>Overflow</h2>
21712333

21722334
<h3 id=overflow-inside-multicol-elements><span class=secno>8.1.
21732335
</span>Overflow inside multicol elements</h3>
2336+
<!--<p>Floated or in-flow content that extends into column gaps (e.g.,
2337+
long words or images) is clipped in the middle of the column gap.-->
21742338

2175-
<p>Floated or in-flow content that extends into column gaps (e.g., long
2176-
words or images) is clipped in the middle of the column gap.
2339+
<p>Floated or in-flow content that extends into column gaps or neighboring
2340+
columns — e.g., long words or images — is not clipped and may
2341+
therefore cause overflow.
21772342

21782343
<div class=example>
2179-
<p>In this example, the black image is wider than the column, and is
2180-
therefore clipped.
2344+
<p>In this example, the black image is wider than the column:
21812345

21822346
<div class=cols>
21832347
<p>Lorem ipsum dolor<br>
@@ -2217,7 +2381,7 @@ <h3 id=overflow-inside-multicol-elements><span class=secno>8.1.
22172381
penatibus et magni.
22182382
</div>
22192383

2220-
<div class=rep style="width: 163px"></div>
2384+
<div class=rep style="width: 183px"></div>
22212385

22222386
<div class=gap style="left: 150px"></div>
22232387

0 commit comments

Comments
 (0)