Skip to content

Commit 02e25a3

Browse files
committed
[css-containment] Clarify that geometry is clipped by contain:paint, too, so you don't get scrollbars from invisible abspos or something.
1 parent 4beb8d9 commit 02e25a3

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

css-containment/Overview.bs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,7 @@ Paint Containment</h3>
192192
Giving an element <dfn export>paint containment</dfn> has the following effects:
193193

194194
1. The contents of the element must be clipped to the element's content box.
195+
This includes both the paint of the descendants and their geometry (similar to overflow).
195196
2. The element must act as a containing block for absolutely positioned and fixed positioned descendants.
196197
3. The element must be a <a>formatting context</a>.
197198

@@ -203,5 +204,10 @@ Paint Containment</h3>
203204

204205
2. If the containing element is ''overflow:visible'',
205206
the UA can reserve "canvas" space for the element exactly the element's size.
206-
(Normally, UAs often predictively overpaint elements somewhat,
207-
so scrolls can start showing content immediately.)
207+
(In similar, scrollable, situations, like ''overflow: hidden'',
208+
it's possible to scroll to the currently-clipped content,
209+
so UAs often predictively overpaint somewhat
210+
so there's something to see as soon as the scroll happens,
211+
rather than a frame later.)
212+
213+

0 commit comments

Comments
 (0)