Skip to content

Conversation

@ddbeck
Copy link
Collaborator

@ddbeck ddbeck commented Nov 25, 2025

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.

@github-actions github-actions bot added the feature definition Creating or defining new features or groups of features. label Nov 25, 2025
@ddbeck ddbeck mentioned this pull request Nov 25, 2025
Copy link
Collaborator

@atopal atopal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@@ -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.
Copy link
Collaborator

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.

Copy link
Collaborator Author

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.

Copy link
Contributor

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

@ddbeck ddbeck marked this pull request as draft December 8, 2025 17:24
@ddbeck ddbeck changed the title Add scroll-target-group feature Add scroll-target-group and scroll-marker-targets Dec 9, 2025
@@ -1,7 +1,7 @@
name: Scroll markers
Copy link
Collaborator Author

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.

@ddbeck ddbeck marked this pull request as ready for review December 9, 2025 11:29
@ddbeck ddbeck requested a review from atopal December 9, 2025 11:42
Copy link
Collaborator

@atopal atopal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Daniel!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature definition Creating or defining new features or groups of features.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

scroll-target-group

3 participants