Setting `scroll-target-group: auto` on a navigation group lets `:target-current` match the link for the visible section. This can replace custom scroll-observer code for a table of contents.
The demo scrolls a document and moves the active item. Supporting browsers compute the state natively; other browsers can use an observer-based fallback.
When to use
Use it to keep a long document’s table of contents in sync with scrolling.