Skip to content

Add more ::scroll-marker-group containment #31

@mstensho

Description

@mstensho

https://drafts.csswg.org/css-overflow-5/#scroll-marker-group-pseudo currently says:

The following additions are recommended for the default UA stylesheet to ensure that the generation of scroll marker pseudo-elements does not invalidate the layout of the site:

/* The generation of ::scroll-marker pseudo-elements cannot invalidate layout outside of this pseudo-element. */
::scroll-marker-group { contain: size !important; }

I also think we should add layout containment (to be completely sure that we don't invalidate the layout of the site), so that scroll markers cannot escape from their scroll marker group (e.g. if the scroll marker is absolutely positioned). Layout containment seems less of a limitation to developers, compared to the size containment that's already there. Not implying layout containment will make it trickier to implement.

One might consider paint containment as well, for the sake of consistency (if that makes sense), although I don't think it makes much of a difference implementation-wise.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions