-
Notifications
You must be signed in to change notification settings - Fork 218
Add scroll-target-group and scroll-marker-targets
#3577
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
base: main
Are you sure you want to change the base?
Conversation
atopal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
features/scroll-target-group.yml
Outdated
| @@ -0,0 +1,10 @@ | |||
| name: scroll-target-group | |||
| description: > | |||
| The `scroll-target-group` CSS property picks an element to be a scroll marker group container, which uses the anchor links within that element as scroll markers. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel free to ignore, since this might just be me, but the benefit wasn't immediately clear to me. How about: The scroll-target-group property designates an element as a container where existing anchor links function as scroll markers. This enables the links to automatically track and highlight which target section is currently scrolled into view.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this review. I started to rewrite this, but I found that, without :target-current as part of this (or some reference to it), it's hard to make sense of this as a standalone feature. I'm going to put this into draft a bit and see if I can come up with something more coherent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it helps, here's another explanation and demo: https://chrome.dev/css-wrapped-2025/#scroll-target-group
Though you're right that this also makes use of :target-group
scroll-target-group featurescroll-target-group and scroll-marker-targets
| @@ -1,7 +1,7 @@ | |||
| name: Scroll markers | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tried to rework this so it's the head feature of the overall cluster of scroll markers as a general feature. I would expect, someday, to see scroll-marker-targets and scroll-target-group merge into this feature.
atopal
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Daniel!
Fixes #3561.
Thanks to @una with this blog post about the feature to help me understand what this is, why it's so cool, and, ultimately, guide to me to a plausible two-sentence description.