Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-selectors-4] Add new :snap pseudo-class #2999

Closed
BillGoldstein opened this issue Aug 8, 2018 · 2 comments
Closed

[css-selectors-4] Add new :snap pseudo-class #2999

BillGoldstein opened this issue Aug 8, 2018 · 2 comments
Labels
selectors-4 Current Work

Comments

@BillGoldstein
Copy link

https://www.w3.org/TR/selectors-4/

Add a :snap pseudo-class for use with scroll-snapping.
Bikeshed the name as appropriate. :snap would be consistant with :focus.

Use case:
One might want to style the snapped item differently than the unsnapped item(s).
E.g. adding a thick border to emphasize the currently snapped item, or de-emphasize the not-currently-snapped item(s) via a filter property.

@myakura myakura added the selectors-4 Current Work label Aug 8, 2018
@jonjohnjohnson
Copy link

Have a feeling that this feature, "a selector that depends on layout", falls victim to the same reasons why something like ":stuck" just isn't a viable pseudo-class...

@tabatkins
Copy link
Member

And in particular, you can turn something unsnapped with a property, at this had the same property cycles, yeah. 😭

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
selectors-4 Current Work
Projects
None yet
Development

No branches or pull requests

4 participants