Skip to content

Commit ac9967e

Browse files
committed
Move effects of containment on regions from [css-contain-1] to [css-regions-1]
1 parent 487f09c commit ac9967e

File tree

2 files changed

+33
-21
lines changed

2 files changed

+33
-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: 27 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,14 @@ 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+
277285
<h3 id="named-flow-section">
278286
Named flows</h3>
279287

@@ -322,12 +330,12 @@ Regions flow breaking rules</h3>
322330
at which point the next region
323331
in the <a>region chain</a>
324332
becomes the current region.
325-
If there are no more <a>CSS Regions</a>
333+
If there are no more usable <a>CSS Regions</a>
326334
in the <a>region chain</a>
327335
and there is still content in the flow,
328336
the positioning of the remaining content
329337
is controlled by the 'region-fragment' property
330-
on the last <a>CSS Region</a> in the chain.
338+
on the <a>last usable CSS Region</a> in the chain.
331339

332340
The CSS regions module follows
333341
the fragmentation rules defined
@@ -462,6 +470,9 @@ The 'flow-into' property</h3>
462470
The writing mode
463471
on subsequent regions is ignored.
464472

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

467478
The 'flow-into' property moves an element into the flow
@@ -607,6 +618,9 @@ The 'flow-from' property</h3>
607618
which is an update to the behavior
608619
described in [[!CSS21]].
609620

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

612626
A block container becomes a <a>CSS Region</a>
@@ -903,7 +917,7 @@ The region-fragment property</h3>
903917
</pre>
904918

905919
The 'region-fragment' property controls the behavior
906-
of the <em id="last-region">last region</em>
920+
of the <a>last usable region</a>
907921
associated with a <a>named flow</a>.
908922

909923
<dl>
@@ -915,7 +929,7 @@ The region-fragment property</h3>
915929
it is subject to the
916930
<a href= "https://www.w3.org/TR/CSS21/visufx.html#propdef-overflow">overflow</a>
917931
property's computed value on the <a>CSS Region</a>.
918-
Region breaks must be ignored on the last region.
932+
Region breaks must be ignored on the <a>last usable region</a>.
919933
</dd>
920934

921935
<dt>break</dt>
@@ -929,7 +943,7 @@ The region-fragment property</h3>
929943
See the <a href= "#regions-flow-breaking-rules">breaking rules</a> section.
930944
A forced region break takes precedence over a natural break point.
931945

932-
Flow content that follows the last break in the last region is not rendered.
946+
Flow content that follows the last break in the <a>last usable region</a> is not rendered.
933947
</dd>
934948
</dl>
935949

@@ -1152,6 +1166,7 @@ The NamedFlow interface</h3>
11521166
method returns the sequence
11531167
of regions in the <a>region chain</a>
11541168
associated with the <a>named flow</a>.
1169+
Regions after the <a>last usable region</a>, if any, are included.
11551170
Note that the returned values
11561171
is a static sequence
11571172
in document order.
@@ -1240,7 +1255,7 @@ The Region interface</h3>
12401255
<dt>''overset''</dt>
12411256

12421257
<dd>
1243-
The region is the last one in the
1258+
The region is the <a>last usable region</a> in the
12441259
<a>region chain</a> and
12451260
not able to fit the remaining content from the <a>named flow</a>.
12461261
Note that the region's
@@ -1249,7 +1264,7 @@ The Region interface</h3>
12491264
property value can be used to control the
12501265
visibility of the overflowing content and the
12511266
'region-fragment' property controls whether or not fragmentation happens
1252-
on the content that overflows the last region.
1267+
on the content that overflows the <a>last usable region</a>.
12531268
</dd>
12541269

12551270
<dt>''fit''</dt>
@@ -1258,11 +1273,11 @@ The Region interface</h3>
12581273
The region's flow fragment content
12591274
fits into the region's
12601275
<a href="https://www.w3.org/TR/CSS21/box.html#box-dimensions">content box</a>.
1261-
If the region is the last one
1276+
If the region is the <a>last usable region</a>
12621277
in the <a>region chain</a>,
12631278
it means that the content
12641279
fits without overflowing.
1265-
If the region is not the last one
1280+
If the region is not the <a>last usable region</a>
12661281
in the <a>region chain</a>,
12671282
that means the <a>named flow</a> content
12681283
may be further fitted in subsequent regions.
@@ -1317,7 +1332,7 @@ The Region interface</h3>
13171332
is the first <code>Node</code>
13181333
in the <a>named flow</a>
13191334
and the <code>startOffset</code> is zero.
1320-
If the region is the last region
1335+
If the region is the <a>last usable region</a>
13211336
in the <a>region chain</a>
13221337
(but not the first and only one),
13231338
the <code>startContainer</code>
@@ -1501,7 +1516,7 @@ Multi-column regions</h2>
15011516
the remaining <a>region chain</a>.
15021517
However,
15031518
if a multicol region
1504-
is the last region
1519+
is the <a>last usable region</a>
15051520
in a <a>region chain</a>,
15061521
then the multicol region must follow the
15071522
<a href="https://drafts.csswg.org/css3-multicol/#overflow-columns">overflow column rules</a>
@@ -2136,6 +2151,7 @@ Changes from <a href="https://www.w3.org/TR/2014/WD-css3-regions-20140218/">Febr
21362151
<ul>
21372152
<li>Added three simpler examples to the introduction</li>
21382153
<li>Moved complex example to the <a href="http://wiki.csswg.org/spec/css3-regions/complex-layout-example">CSSWG wiki</a></li>
2154+
<li>Moved the effects of CSS containment to this specification from [[CSS-CONTAIN-1]].
21392155
</ul>
21402156

21412157
<h3 id="changes_from_May_28_2013">

0 commit comments

Comments
 (0)