-
Notifications
You must be signed in to change notification settings - Fork 759
Description
As mentioned in WICG/display-locking#147, the addition of contain:paint to subtree-visibility:auto elements constrains use of ink overflow to the border box of the element. This is good for avoiding flicker and limiting raster costs, but makes it difficult or awkward for developers to support content that has legitimate ink overflow.
This can be fixed by a new contain-paint-margin CSS property that allows the contain:paint clip to be expanded by a fixed amount. Syntax:
contain-paint-margin: none | <width height>
Here width and height are positive, physical lengths. none has the same effect as 0px 0px.
Even in cases where a developer is not using subtree-visibility but wishes to apply contain:paint, this property will still be useful as a way to allow a fixed amount of ink overflow.