Skip to content

[css-scroll-snap] A way to select the currently snapped element. #7430

Description

@jespertheend

https://drafts.csswg.org/css-scroll-snap-1/

I would like to style the currently differently. Currently the only way to do this is using JavaScript. And any existing solutions I could find don't seem very robust:

Something like :scroll-snapped could be nice. Although maybe that is too specific to my personal use case.

I'd also like to get access to the currently snapped element via JavaScript, as I plan on performing an action on the snapped element when the user clicks a button. But I don't think this is the correct repository for that request?

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