Skip to content

Commit fd4fbf7

Browse files
frivoaltabatkins
authored andcommitted
[css-containment] Clarify ambiguous phrasing (#831)
In a few places, this is an editorial change merely making sure that there is no way to misinterpret what was meant. In addition this gives a normative definition to the previously vague requirement that in certain cases an element "must be a formatting context". Closes #830
1 parent e4e62e1 commit fd4fbf7

File tree

1 file changed

+13
-7
lines changed

1 file changed

+13
-7
lines changed

css-containment/Overview.bs

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,7 @@ Layout Containment</h3>
184184

185185
Giving an element <dfn export>layout containment</dfn> has the following effects:
186186

187-
1. The element must be a <a>formatting context</a>.
188-
189-
Issue: This needs to specify how it becomes a formatting
190-
context (and which type it becomes).
187+
1. The element <a>becomes a formatting context</a>.
191188

192189
2. If a <a>fragmentation context</a> participates in <a>layout containment</a>,
193190
the first element with <a>layout containment</a>
@@ -286,9 +283,9 @@ Paint Containment</h3>
286283
to access or indicate the presence of the clipped content;
287284
nor does it inhibit the creation of any such mechanism through other properties,
288285
such as 'overflow', 'resize', or 'text-overflow'.
289-
2. The element must act as a containing block for absolutely positioned and fixed positioned descendants.
290-
3. The element must be a <a>stacking context</a>.
291-
4. The element must be a <a>formatting context</a>.
286+
2. The element acts as a containing block for absolutely positioned and fixed positioned descendants.
287+
3. The element creates a <a>stacking context</a>.
288+
4. The element <a>becomes a formatting context</a>.
292289

293290
Possible optimizations that can be enabled by <a>paint containment</a> include (but are not limited to):
294291

@@ -308,6 +305,15 @@ Paint Containment</h3>
308305
3. Because they are guaranteed to be stacking contexts,
309306
scrolling elements can be painted into a single GPU layer.
310307

308+
<h2 id="becoming-formatting-context">Becoming a formatting context</h2>
309+
310+
When required by <a>layout containment</a> and <a>paint containment</a>,
311+
an element may need to <dfn lt='become a formatting context|becomes a formatting context'>become a <a>formatting context</a></dfn>.
312+
If the element already establishes a <a>formatting context</a> of any kind,
313+
this condition is satisfied.
314+
Otherwise, it is made to establish a <a>BFC</a> by changing its <a>inner display type</a> to ''flow-root''.
315+
316+
311317
Privacy and Security Considerations {#privsec}
312318
==============================================
313319

0 commit comments

Comments
 (0)