[css-overflow-5] Add an example for 'scroll-target-group' property#12449
Merged
danielsakhapov merged 2 commits intoJul 4, 2025
Conversation
As requested in Intent to Ship thread: https://groups.google.com/a/chromium.org/g/blink-dev/c/R_VD_FkYrF8/m/XDzix9lbAwAJ adding an example to show how to use 'scroll-target-group' property to highlight the currently visible chapter within a table of contents.
flackr
approved these changes
Jul 4, 2025
flackr
left a comment
Contributor
There was a problem hiding this comment.
Looks good but I left some suggestions to make it a bit more concise.
| color: blue; | ||
| display: block; | ||
| padding: 10px; | ||
| text-decoration: none; |
Contributor
There was a problem hiding this comment.
not necessary but for the purposes of an example you could probably skip most of this styling, i.e.
display: blockisn't necessary if the links are in a block element, commonly table of contents are a<ul>or<ol>with<li>wrapping each of the links (the structure of the spec table of contents itself).- Links are normally blue anyways right?
- In a structured list, padding wouldn't be necessary on the link tag.
- Hiding the link text decoration seems like an optional thing.
TLDR I think you should remove this block completely, change #toc to an <ol> element and wrap each of the <a> elements in a <li>.
Updated: Sorry my comment got a bit mangled but it looks like you got it :-)
flackr
approved these changes
Jul 4, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As requested in Intent to Ship thread:
https://groups.google.com/a/chromium.org/g/blink-dev/c/R_VD_FkYrF8/m/XDzix9lbAwAJ adding an example to show how to use 'scroll-target-group' property to highlight the currently visible chapter within a table of contents.