Skip to content

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

Open
@vmpstr

Description

@vmpstr

The css-contain-2's content-visibility spec 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"

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions