You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Editor: Florian Rivoal, On behalf of Bloomberg, https://florian.rivoal.net/, w3cid 43241
14
14
Abstract: This CSS module describes the 'contain' property, which indicates that the element's subtree is independent of the rest of the page. This enables heavy optimizations by user agents when used well.
Link Defaults: css-lists-3 (property) counter-increment
17
17
</pre>
18
18
<pre class="anchors">
@@ -213,10 +213,11 @@ Layout Containment</h3>
213
213
If the element does not generate a <a>principal box</a> (as is the case with ''display: contents'' or ''display: none''),
214
214
or if the element is an <a spec="css-display-3">internal table element</a> other than ''display: table-cell'',
215
215
or if the element is an <a spec="css-display-3">internal ruby element</a>,
216
+
or if the element's <a>principal box</a> is a <a spec="css-display-3" lt="atomic inline">non-atomic</a><a spec="css-display-3">inline-level</a> box,
216
217
layout containment has no effect.
217
218
Otherwise, giving an element <dfn export>layout containment</dfn> has the following effects:
218
219
219
-
1. The element <a>becomes a formatting context root</a>.
220
+
1. The element <a>establishes a formatting context</a>.
220
221
221
222
2. If a <a>fragmentation context</a> participates in <a>layout containment</a>,
222
223
the first element with <a>layout containment</a>
@@ -338,6 +339,7 @@ Paint Containment</h3>
338
339
If the element does not generate a <a>principal box</a> (as is the case with ''display: contents'' or ''display: none''),
339
340
or if the element is an <a spec="css-display-3">internal table element</a> other than ''display: table-cell'',
340
341
or if the element is an <a spec="css-display-3">internal ruby element</a>,
342
+
or if the element's <a>principal box</a> is a <a spec="css-display-3" lt="atomic inline">non-atomic</a><a spec="css-display-3">inline-level</a> box,
341
343
paint containment has no effect.
342
344
Otherwise, giving an element <dfn export>paint containment</dfn> has the following effects:
343
345
@@ -352,7 +354,7 @@ Paint Containment</h3>
352
354
<span class=note>This is as if to ''overflow: visible'' was changed to ''overflow: clip'' at used value.</span>
353
355
2. The element acts as a containing block for absolutely positioned and fixed positioned descendants.
354
356
3. The element creates a <a>stacking context</a>.
355
-
4. The element <a>becomes a formatting context root</a>.
357
+
4. The element <a>establishes a formatting context</a>.
356
358
357
359
Possible optimizations that can be enabled by <a>paint containment</a> include (but are not limited to):
358
360
@@ -372,19 +374,6 @@ Paint Containment</h3>
372
374
3. Because they are guaranteed to be stacking contexts,
373
375
scrolling elements can be painted into a single GPU layer.
374
376
375
-
<h2 id="becoming-formatting-context">Becoming a formatting context root</h2>
376
-
377
-
In some some types of containment,
378
-
a box may need to <dfn export lt='become a formatting context root|becomes a formatting context root|becoming a formatting context root'>become a <a>formatting context</a> root</dfn>.
379
-
If the box already establishes a <a>formatting context</a> of any kind other than an <a>inline formatting context</a>,
380
-
this condition is satisfied.
381
-
Otherwise, it is made to establish a <a>BFC</a> by changing its <a>inner display type</a> to ''flow-root''.
382
-
This change happens at <a>used value</a> time,
383
-
and does not affect the <a>computed value</a> of the 'display' property.
384
-
385
-
Issue: What should we do about boxes that establish <a>ruby formatting contexts</a>?
386
-
See some discussion here: https://github.com/w3c/csswg-drafts/issues/1457#issuecomment-319996309
387
-
388
377
389
378
Privacy and Security Considerations {#privsec}
390
379
==============================================
@@ -461,20 +450,19 @@ This appendix is <em>informative</em>.
461
450
<a href="https://www.w3.org/TR/2017/CR-css-contain-1-20170808/">Candidate Recommendation of 8 August 2017</a></h3>
462
451
463
452
<ul>
464
-
<li>Move the definition of "Becoming a formatting context" back to this specification
465
-
<li>Rename "Becoming a formatting context" to "Becoming a formatting context root".
466
453
<li>Clarify to which box paint containment clips.
467
454
<li>Move the interaction between containment and the <code>bookmark-*</code> and <code>string-set</code> properties to [[CSS-CONTENT-3]]
468
455
<li>Remove the effects of style containment on the "break-*" properties.
469
456
<li>Move the description of the effects of containement on regions from this specification to [[CSS-REGIONS-1]].
470
457
<li>Clarify the effects of style scoping on counter-set and counter-increment
471
458
<li>Size layout and paint containment don't apply to internal ruby elements
472
-
<li>Size containment does not apply to non-atomic inlines
459
+
<li>Layout, Paint, and size containments do not apply to non-atomic inlines
473
460
<li>Align paint containment's behavior with overflow:clip
474
461
<li>Elements with size containment are monolithic
475
462
<li>Forced breaks area allowed in elements with layout containments, but do not propagate
476
463
<li>Clarify the effects of scoping to a subtree
477
464
<li>Clarify the effects of scoping on counters
465
+
<li>Editorial clarification: replace "Becoming a formatting context" (aka "Becoming a formatting context root") with "Establish a FC"
0 commit comments