Skip to content

Commit a83fcc9

Browse files
committed
[css-containment] Express paint containment in terms of overflow:clip
Based on this resolution: https://lists.w3.org/Archives/Public/www-style/2015Apr/0405.html
1 parent 4a71f42 commit a83fcc9

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

css-containment/Overview.bs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,12 @@ Paint Containment</h3>
197197

198198
Giving an element <dfn export>paint containment</dfn> has the following effects:
199199

200-
1. The contents of the element must be clipped to the element's content box.
201-
This includes both the paint of the descendants and their geometry (similar to overflow).
200+
1. As specified in [[!CSS-OVERFLOW-3]],
201+
the computed value the 'overflow-x' and 'overflow-y' is changed to ''overflow/clip''
202+
if it would otherwise have been ''overflow/visible''.
203+
<span class=note>This means that regardless of the specified value of 'overflow',
204+
the contents of the element is clipped to the element's content box,
205+
including both the paint of the descendants and their geometry</span>
202206
2. The element must act as a containing block for absolutely positioned and fixed positioned descendants.
203207
3. The element must be a <a>formatting context</a>.
204208

@@ -208,7 +212,8 @@ Paint Containment</h3>
208212
the UA can directly skip trying to paint its contents,
209213
as they're guaranteed to be off-screen/obscured as well.
210214

211-
2. If the containing element is ''overflow:visible'',
215+
2. If the containing element would have been ''overflow:visible'',
216+
it becomes ''overflow:clip'' and
212217
the UA can reserve "canvas" space for the element exactly the element's size.
213218
(In similar, scrollable, situations, like ''overflow: hidden'',
214219
it's possible to scroll to the currently-clipped content,

0 commit comments

Comments
 (0)