[csswg-drafts] [css-contain-2] Clarify what happens with scrollbars on elements that 'skip their contents' (#5868)

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

== [css-contain-2] Clarify what happens with scrollbars on elements that 'skip their contents' ==
The [css-contain-2's content-visibility spec](https://www.w3.org/TR/css-contain-2/#skips-its-contents) says that when the element skips its content, then

> its contents ... are not painted (as if they had visibility: hidden) and do not respond to hit-testing (as if they had pointer-events: none).

The intent of this is to ensure that we don't need to render (style / layout) the subtree and thus we can skip this work. However, if the element itself is a scroller then having its contents be "as if they had visibility: hidden" is not sufficient for us to skip the work, since the size of the overflow is reflected in the scrollbar and the scroll thumb size. 

I think we should clarify this. Ideally we can say something like "as if they had display: none", or maybe just explicitly says "and the size of the contents does not contribute to the overflow of the element or its ancestors"


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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 13 January 2021 20:00:26 UTC