Skip to content

Commit 5afdd93

Browse files
authored
[css-multicol] Pass at incorporating the new model plus clarification in the issue re naming (w3c#3999)
* Trying to incorporate the new model * Tidying up section about gaps The gap is the same size in all rows and lines in the container. * update to PR based on discussion at F2F * Fixing up the multicol model
1 parent 779af8e commit 5afdd93

File tree

1 file changed

+64
-40
lines changed

1 file changed

+64
-40
lines changed

css-multicol-1/Overview.bs

Lines changed: 64 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -149,41 +149,77 @@ Introduction</h2>
149149
<h2 id="the-multi-column-model">
150150
The multi-column model</h2>
151151

152-
A <dfn lt="multi-column container|multicol container" oldids="multi-column-element" export>multi-column container</dfn>
153-
(or <i>multicol container</i> for short)
154-
is an element whose 'column-width' or 'column-count'
155-
property is not ''column-width/auto'' and therefore acts as a container for
156-
multi-column layout.
157-
158-
<wpt>
159-
multicol-count-computed-004.xht
160-
</wpt>
161-
162-
In the traditional CSS box model, the content of an element is
163-
flowed into the content box of the corresponding element. Multi-column
164-
layout introduces a new type of container between the content box and
165-
the content, namely the <dfn export local-lt=column>column box</dfn> (or <i>column</i> for
166-
short). The content of a multicol container is flowed into its column
167-
boxes.
168-
169-
Column boxes in a multi-column container are arranged into <dfn export lt="column row" local-lt=row>rows</dfn>.
170-
Like table cells,
171-
the column boxes in a row are ordered
172-
in the inline direction of the multicol container.
173-
The <dfn export>column width</dfn> is the length of the column box in the inline direction.
152+
An element whose 'column-width' or 'column-count' property is not ''column-width/auto''
153+
establishes a <dfn lt="multi-column container|multicol container" oldids="multi-column-element" export>multi-column container</dfn>
154+
(or <i>multicol container</i> for short),
155+
and therefore acts as a container for [=multi-column layout=].
156+
157+
In the traditional CSS box model,
158+
the content of an element is
159+
flowed into the content box of the corresponding element.
160+
Multi-column layout introduces a [=fragmentation context=]
161+
formed of <a lt="anonymous box">anonymous</a> [=fragmentation containers=]
162+
called <dfn export lt="column box" local-lt=column>column boxes</dfn>
163+
(or <i>columns</i> for short).
164+
These [=column boxes=] establish
165+
an independent [=block formatting context=]
166+
into which the multi-column container's content flows,
167+
and form the [=containing block=] for its non-positioned childen.
168+
Content overflowing a [=column box=] in the [=block axis=]
169+
[=fragments=] and continues in the next [=column box=].
170+
171+
Note: Column boxes, which are [=anonymous boxes=],
172+
do not become the containing block
173+
for [=absolutely-positioned boxes=].
174+
The 'position' property, which establishes a containing block for such boxes,
175+
applies to the [=multicol container=], it being the [=principal box=].
176+
177+
The column boxes are ordered
178+
in the [=inline base direction=] of the multicol container
179+
and arranged into <dfn lt="multi-column line | multi-col line">multicol lines</dfn>.
180+
The <dfn export>column width</dfn> is the length of the column box in the inline direction.
174181
The <dfn export>column height</dfn> is the length of the column box in the block direction.
175-
All column boxes in a row have the same column width,
176-
and all column boxes in a row have the same column height.
177-
Within each row in the multi-column container,
182+
All column boxes in a line have the same column width,
183+
and all column boxes in a line have the same column height.
184+
185+
Within each [=multi-col line=] in the multi-column container,
178186
adjacent column boxes are separated by a <dfn noexport>column gap</dfn>,
179187
which may contain a <dfn noexport>column rule</dfn>.
180-
All column gaps in the same row are equal.
181-
All column rules in the same row are also equal, if they appear;
188+
All column gaps in the same multi-column container are equal.
189+
All column rules in the same multi-column container are also equal, if they appear;
182190
column rules only appear between columns that both have content.
183191

184-
In the simplest case a multicol container will contain only one row
192+
In the simplest case a multicol container will contain only one line
185193
of columns, and the height of each column will be equivalent to the
186194
used height of the multi-column container's content box.
195+
However, [=fragmentation=] or [=spanners=]
196+
can split the content of the [=multi-column container=]
197+
into multiple [=multi-col lines=].
198+
199+
If the multi-column container is paginated, the height of each column is
200+
constrained by the page and the content continues in a new line of
201+
column boxes on the next page; a column box never splits across pages.
202+
203+
The same effect occurs when a <i>spanning element</i> divides the
204+
multi-column container: the columns before the spanning element are
205+
balanced and shortened to fit their content. Content after the
206+
spanning element then flows into a new, subsequent line of column boxes.
207+
208+
A [=multi-column container=] therefore is a regular [=block container=]
209+
that establishes a new [=independent formatting context=]
210+
whose contents consist of a series of
211+
[=multi-col lines=] and [=multi-col spanners=].
212+
Each [=multi-column line=] acts as a [=block-level box=]
213+
that establishes a [=multi-column formatting context=]
214+
for its [=column boxes=];
215+
and each [=spanner=] acts as a [=block-level box=]
216+
that establishes an [=independent formatting context=]
217+
with its type depending on its 'display' value as usual.
218+
219+
<wpt>
220+
multicol-count-computed-004.xht
221+
</wpt>
222+
187223

188224
<div class="example">
189225
Column gaps (diagonal hatching) and column rules are shown in this
@@ -205,25 +241,13 @@ The multi-column model</h2>
205241
</figure>
206242
</div>
207243

208-
If the multi-column container is paginated, the height of each row is
209-
constrained by the page and the content continues in a new row of
210-
column boxes on the next page; a column box never splits across pages.
211-
212-
The same effect occurs when a <i>spanning element</i> divides the
213-
multi-column container: the columns before the spanning element are
214-
balanced and shortened to fit their content. Content after the
215-
spanning element then flows into a new row of column boxes.
216-
217244
<div class="example">
218245
<figure>
219246
<img alt="a diagram showing a spanning element causing the shortened columns above the element with text continuing in new columns below" src="images/simple-span-example.svg">
220247
<figcaption>A demonstration of how the spanning element divides the multicol container.</figcaption>
221248
</figure>
222249
</div>
223250

224-
Column boxes are block container boxes. The multi-column container is the principal box, and column boxes are anonymous.
225-
226-
Note: Column boxes do not become the containing block for elements with ''position: fixed'' or ''position: absolute''. The containing block is the multicol container, it being the principal box.
227251

228252
<wpt>
229253
multicol-containing-001.xht

0 commit comments

Comments
 (0)