Skip to content

Commit e4e62e1

Browse files
frivoaltabatkins
authored andcommitted
[css-containment][css-overflow] Remove dependency of containment on overflow:clip (w3c#829)
1 parent 238cdba commit e4e62e1

2 files changed

Lines changed: 10 additions & 18 deletions

File tree

css-containment/Overview.bs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -278,11 +278,14 @@ Paint Containment</h3>
278278

279279
Giving an element <dfn export>paint containment</dfn> has the following effects:
280280

281-
1. If the computed value of overflow-x or overflow-y would otherwise have been ''overflow/visible'',
282-
it must instead compute to ''overflow/clip''. [[!CSS-OVERFLOW-3]]
283-
<span class=note>This means that regardless of the specified value of 'overflow',
284-
the contents of the element is clipped to the element's content box,
285-
including both the paint of the descendants and their geometry</span>
281+
1. The contents of the element must be clipped to the element's content box,
282+
including both the paint of the descendants and their geometry.
283+
<span class=note>This is similar to ''overflow: clip'',
284+
but has no effect or dependency on the computed value of the 'overflow' property.</span>
285+
This does not include the creation of any mechanism
286+
to access or indicate the presence of the clipped content;
287+
nor does it inhibit the creation of any such mechanism through other properties,
288+
such as 'overflow', 'resize', or 'text-overflow'.
286289
2. The element must act as a containing block for absolutely positioned and fixed positioned descendants.
287290
3. The element must be a <a>stacking context</a>.
288291
4. The element must be a <a>formatting context</a>.
@@ -293,8 +296,8 @@ Paint Containment</h3>
293296
the UA can directly skip trying to paint its contents,
294297
as they're guaranteed to be off-screen/obscured as well.
295298

296-
2. If the containing element's overflow has been changed to ''overflow/clip''
297-
(because it was originally ''overflow/visible''),
299+
2. Unless the clipped content is made accessible via a separate mechanism
300+
such as the 'overflow', 'resize', or 'text-overflow' properties,
298301
the UA can reserve "canvas" space for the element exactly the element's size.
299302
(In similar, scrollable, situations, like ''overflow: hidden'',
300303
it's possible to scroll to the currently-clipped content,

css-overflow/Overview.bs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ type: dfn; spec:css-multicol-1; text:overflow column
2929
<pre class="anchors">
3030
url: https://www.w3.org/TR/2008/CR-css3-marquee-20081205/#the-overflow-style; type: property; text: overflow-style;
3131
url: https://drafts.csswg.org/selectors-3/#subject; type: dfn; text: subject;
32-
url: https://drafts.csswg.org/css-containment/#propdef-contain; type: property; text: contain
33-
url: https://drafts.csswg.org/css-containment/#paint-containment; type: dfn; text: paint containment
3432
</pre>
3533
<style>
3634
table.source-demo-pair {
@@ -392,15 +390,6 @@ Introduction</h2>
392390
then computed values are the cascaded values
393391
with ''overflow/visible'' changed to ''overflow/auto''.
394392
</li>
395-
<li>
396-
Otherwise, if both cascaded values are ''overflow/visible''
397-
and the computed value of 'contain' is
398-
one that activates <a>paint containment</a>
399-
(e.g. ''contain:strict''
400-
or ''contain: paint''
401-
or ''contain: layout paint''…),
402-
then the computed values of both 'overflow-x' and 'overflow-y'
403-
are changed to ''overflow/clip''.</li>
404393
<li>
405394
Otherwise, the computed values are as specified.
406395
</li>

0 commit comments

Comments
 (0)