[csswg-drafts] [css-contain] Add contain-paint-margin CSS property (#4934)

chrishtr has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-contain] Add contain-paint-margin CSS property ==
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.

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/4934 using your GitHub account

Received on Thursday, 9 April 2020 22:17:13 UTC