[csswg-drafts] [css-contain-2] interaction between content-visibility and overflow-clip-margin (#5271)

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

== [css-contain-2] interaction between content-visibility and overflow-clip-margin ==
Per [css-contain-2 ยง4](https://drafts.csswg.org/css-contain-2/#content-visibility):

> An element is relevant to the user if any of the following conditions are true:
>     The element is "on-screen": its containing box's border box intersects with the viewport, or a user-agent defined margin around the viewport.

paint containment normally clips to the padding box, which is normally smaller than the border box, so the above should be fine in general, however paint containment can be made to apply to a larger area using overflow-clip-margin. In that case, it seems that the element should also be considered relevant to the user if its overflow clip edge (i.e. padding edge +  overflow-clip-margin) intersects with the viewport.

More over, since its only the contents of a skipped element that are not painted, rather than the element itself, it doesn't seem like the border box is the relevant one. So I don't feel we need to worry about the union of, or the larger of, the border box and the overflow clip edge, and in the sentence quoted above, we can just replace border box with overflow clip edge.

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

Received on Tuesday, 30 June 2020 10:10:10 UTC