Skip to content

Commit 56c7003

Browse files
authored
Merge pull request w3c#2310 from frivoal/region-containment
Move effects of containment on regions from [css-contain-1] to [css-regions-1]
2 parents 27331ac + 15b6dc1 commit 56c7003

File tree

2 files changed

+34
-21
lines changed

2 files changed

+34
-21
lines changed

css-contain-1/Overview.bs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -224,15 +224,8 @@ Layout Containment</h3>
224224
they remain part of the <a>fragmentation context</a>,
225225
but do not receive any content from the <a>fragmented flow</a>.
226226

227-
Specifically:
228-
- <a>CSS Regions</a> following the one which traps the content
229-
are still considered part of the <a>region chain</a>
230-
as returned by the {{NamedFlow/getRegions()}} method
231-
of the {{NamedFlow}} interface.
232-
- the {{Region/regionOverset}} attribute of the {{Region}} interface
233-
of the region which traps the content
234-
is set to ''overset'' if the content doesn't fit,
235-
even if it is not the last region in the region chain.
227+
Note: [[CSS-REGIONS-1]] has details over how <a>layout containment</a> affects
228+
regions.
236229

237230
3. If the contents of the element overflow the element,
238231
they must be treated as <a>ink overflow</a>.
@@ -261,9 +254,11 @@ Style Containment</h3>
261254

262255
Giving an element <dfn export>style containment</dfn> has the following effects:
263256

264-
1. The 'counter-increment', 'counter-set', 'flow-from', 'flow-into', and <a property spec=css2>content</a> (for the purpose of ''content/open-quote''/etc values) properties
257+
1. The 'counter-increment', 'counter-set', and <a property spec=css2>content</a> (for the purpose of ''content/open-quote''/etc values) properties
265258
must be <a for=property>scoped</a> to the element's sub-tree.
266259

260+
Note: [[CSS-REGIONS-1]] has normative requirements on how <a>style containment</a> affects regions.
261+
267262
A <dfn export for=property lt="scoped | scoped property | scoped properties">scoped property</dfn> has its effects scoped to a particular element or subtree.
268263
It must act as if the scoping element was the root of the document
269264
for the purpose of evaluating the property's effects:
@@ -416,6 +411,7 @@ This appendix is <em>informative</em>.
416411
<li>Clarify to which box paint containment clips.
417412
<li>Move the interaction between containment and the <code>bookmark-*</code> and <code>string-set</code> properties to [[CSS-CONTENT-3]]
418413
<li>Remove the effects of style containment on the "break-*" properties.
414+
<li>Move the description of the effects of containement on regions from this specification to [[CSS-REGIONS-1]].
419415
</ul>
420416

421417
<h3 id="2017-04-19-changes">Changes from the

css-regions-1/Overview.bs

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,15 @@ Region chain</h3>
274274
into a <a>region chain</a>
275275
according to the document order.
276276

277+
<h3 id=last-region>
278+
Last region</h3>
279+
280+
A <a>CSS region</a> is deemed to be the <dfn lt="last usable region | last usable CSS region">last usable region</dfn>
281+
in a <a>region chain</a>
282+
if it is the first region in that chain to have <a>layout containment</a>,
283+
or the last region in the chain if none of them have <a>layout containment</a>
284+
(See [[!CSS-CONTAIN-1]]).
285+
277286
<h3 id="named-flow-section">
278287
Named flows</h3>
279288

@@ -322,12 +331,12 @@ Regions flow breaking rules</h3>
322331
at which point the next region
323332
in the <a>region chain</a>
324333
becomes the current region.
325-
If there are no more <a>CSS Regions</a>
334+
If there are no more usable <a>CSS Regions</a>
326335
in the <a>region chain</a>
327336
and there is still content in the flow,
328337
the positioning of the remaining content
329338
is controlled by the 'region-fragment' property
330-
on the last <a>CSS Region</a> in the chain.
339+
on the <a>last usable CSS Region</a> in the chain.
331340

332341
The CSS regions module follows
333342
the fragmentation rules defined
@@ -462,6 +471,9 @@ The 'flow-into' property</h3>
462471
The writing mode
463472
on subsequent regions is ignored.
464473

474+
If an element has <a>style containment</a> (See [[!CSS-CONTAIN-1]]),
475+
then the 'flow-into' property must be <a for=property>scoped</a> to that element.
476+
465477
<div class="note"><span class="note-prefix">Note </span>
466478

467479
The 'flow-into' property moves an element into the flow
@@ -607,6 +619,9 @@ The 'flow-from' property</h3>
607619
which is an update to the behavior
608620
described in [[!CSS21]].
609621

622+
If an element has <a>style containment</a> (See [[!CSS-CONTAIN-1]]),
623+
then the 'flow-from' property must be <a for=property>scoped</a> to that element.
624+
610625
<div class="note"><span class="note-prefix">Note </span>
611626

612627
A block container becomes a <a>CSS Region</a>
@@ -903,7 +918,7 @@ The region-fragment property</h3>
903918
</pre>
904919

905920
The 'region-fragment' property controls the behavior
906-
of the <em id="last-region">last region</em>
921+
of the <a>last usable region</a>
907922
associated with a <a>named flow</a>.
908923

909924
<dl>
@@ -915,7 +930,7 @@ The region-fragment property</h3>
915930
it is subject to the
916931
<a href= "https://www.w3.org/TR/CSS21/visufx.html#propdef-overflow">overflow</a>
917932
property's computed value on the <a>CSS Region</a>.
918-
Region breaks must be ignored on the last region.
933+
Region breaks must be ignored on the <a>last usable region</a>.
919934
</dd>
920935

921936
<dt>break</dt>
@@ -929,7 +944,7 @@ The region-fragment property</h3>
929944
See the <a href= "#regions-flow-breaking-rules">breaking rules</a> section.
930945
A forced region break takes precedence over a natural break point.
931946

932-
Flow content that follows the last break in the last region is not rendered.
947+
Flow content that follows the last break in the <a>last usable region</a> is not rendered.
933948
</dd>
934949
</dl>
935950

@@ -1152,6 +1167,7 @@ The NamedFlow interface</h3>
11521167
method returns the sequence
11531168
of regions in the <a>region chain</a>
11541169
associated with the <a>named flow</a>.
1170+
Regions after the <a>last usable region</a>, if any, are included.
11551171
Note that the returned values
11561172
is a static sequence
11571173
in document order.
@@ -1240,7 +1256,7 @@ The Region interface</h3>
12401256
<dt>''overset''</dt>
12411257

12421258
<dd>
1243-
The region is the last one in the
1259+
The region is the <a>last usable region</a> in the
12441260
<a>region chain</a> and
12451261
not able to fit the remaining content from the <a>named flow</a>.
12461262
Note that the region's
@@ -1249,7 +1265,7 @@ The Region interface</h3>
12491265
property value can be used to control the
12501266
visibility of the overflowing content and the
12511267
'region-fragment' property controls whether or not fragmentation happens
1252-
on the content that overflows the last region.
1268+
on the content that overflows the <a>last usable region</a>.
12531269
</dd>
12541270

12551271
<dt>''fit''</dt>
@@ -1258,11 +1274,11 @@ The Region interface</h3>
12581274
The region's flow fragment content
12591275
fits into the region's
12601276
<a href="https://www.w3.org/TR/CSS21/box.html#box-dimensions">content box</a>.
1261-
If the region is the last one
1277+
If the region is the <a>last usable region</a>
12621278
in the <a>region chain</a>,
12631279
it means that the content
12641280
fits without overflowing.
1265-
If the region is not the last one
1281+
If the region is not the <a>last usable region</a>
12661282
in the <a>region chain</a>,
12671283
that means the <a>named flow</a> content
12681284
may be further fitted in subsequent regions.
@@ -1317,7 +1333,7 @@ The Region interface</h3>
13171333
is the first <code>Node</code>
13181334
in the <a>named flow</a>
13191335
and the <code>startOffset</code> is zero.
1320-
If the region is the last region
1336+
If the region is the <a>last usable region</a>
13211337
in the <a>region chain</a>
13221338
(but not the first and only one),
13231339
the <code>startContainer</code>
@@ -1501,7 +1517,7 @@ Multi-column regions</h2>
15011517
the remaining <a>region chain</a>.
15021518
However,
15031519
if a multicol region
1504-
is the last region
1520+
is the <a>last usable region</a>
15051521
in a <a>region chain</a>,
15061522
then the multicol region must follow the
15071523
<a href="https://drafts.csswg.org/css3-multicol/#overflow-columns">overflow column rules</a>
@@ -2136,6 +2152,7 @@ Changes from <a href="https://www.w3.org/TR/2014/WD-css3-regions-20140218/">Febr
21362152
<ul>
21372153
<li>Added three simpler examples to the introduction</li>
21382154
<li>Moved complex example to the <a href="http://wiki.csswg.org/spec/css3-regions/complex-layout-example">CSSWG wiki</a></li>
2155+
<li>Moved the effects of CSS containment to this specification from [[CSS-CONTAIN-1]].
21392156
</ul>
21402157

21412158
<h3 id="changes_from_May_28_2013">

0 commit comments

Comments
 (0)