Skip to content

[css-scroll-snap] Programmatically scroll to snap points #8558

@SebastianZ

Description

@SebastianZ

@Schepp mentioned in #156 that he'd like to have a way to programmatically scroll to a certain snap point.

There are indeed use cases in which authors may want more explicit control over the scroll position when scrolling with a scroll container. E.g. scrolling to a specific image in a gallery.

A possible solution for that would be to reuse the scrollTo() function for that. Its ScrollToOptions dictionary could be extended by a new option indicating a snap point.

Sebastian

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