Skip to content

[css-scroll-snap] Multiple nested scrollers and a "default" scrollIntoView()? #2593

Closed
@tabatkins

Description

@tabatkins

Our intention in #1708 is that scrollIntoView()'s alignment arg is honored if specified, but if it's unspecified we honor scroll-snap; only when both are unspecified do we use the "default" sIV() alignment.

What do we do when the targetted element is nested into multiple scrollable elements, tho? Each one of them needs to be scrolled to bring the element into view. When sIV() doesn't specify a particular alignment, how should we treat all the nested scrollers? In particular, what if some of them have scroll-snap specified, while others don't?

Honoring scroll-snap on the scrollers that have it, and default-aligning the rest, seems like probably the best behavior, but it's also significantly more complicated for implementations, as they have to collect and track more data as they execute the scroll operation. What should we do?

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