Skip to content

Commit 4ce37eb

Browse files
committed
[css-containment] Fix layout containment and fragmentainer interaction
1 parent e20fac7 commit 4ce37eb

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

css-containment/Overview.bs

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,37 @@ Layout Containment</h3>
138138

139139
2. The element must be a <a>formatting context</a>.
140140

141+
3. If a <a>fragmentation context</a> participates in <a>layout containment</a>,
142+
the first element with <a>layout containment</a>
143+
affecting the <a>fragmentation context</a>
144+
must “trap” the remainder of the <a>fragmented flow</a>.
145+
<a>Fragmentation</a> must not continue past the <a>layout containment</a> boundary,
146+
and the last <a>fragmentation container</a>
147+
within the first <a>layout containment</a> boundary
148+
is treated as if it is the last <a>fragmentation container</a>
149+
in its <a>fragmentation context</a>.
150+
151+
If subsequent <a>fragmentation containers</a> in the <a>fragmentation context</a>
152+
are only generated when more content remains in the <a>fragmented flow</a>,
153+
then they are not generated.
154+
If they would exist regardless,
155+
they remain part of the <a>fragmentation context</a>,
156+
but do no receive any content from the <a>fragmented flow</a>.
157+
158+
Specifically:
159+
- <a spec=css-regions>CSS Regions</a> following the one which traps the content
160+
are still considered part of the <a spec=css-regions>region chain</a>
161+
as returned by the {{getRegions()}} method
162+
of the {{NamedFlow}} interface.
163+
- the {{regionOverset}} attribute of the {{Region}} interface
164+
of the region which traps the content
165+
is set to ''overset'' if the content doesn't fit,
166+
even if it is not the last region in the region chain.
167+
- If the computed value of the 'continue' property
168+
on an element with <a>layout containment</a>
169+
would otherwise have been ''continue/auto'' or ''continue/fragments'',
170+
it must instead compute to ''continue/overflow''.
171+
141172
Possible optimizations that can be enabled by <a>layout containment</a> include (but are not limited to):
142173

143174
1. When the style or contents of a descendant of the containing element is changed,

0 commit comments

Comments
 (0)