v135 · css
::scroll-marker and ::scroll-marker-group for Carousel
::scroll-marker and ::scroll-marker-group for scrolling containers: Pseudo elements that allow to create a set of focusable markers for all of the associated items within the scrolling container.
concepts
-
Marker dots for a carousel
The minimal pattern: each panel emits a dot,
:target-currentauto-highlights the visible one. No script bookkeeping required. -
Numbered pagination from a CSS counter
The spec's pull-quote example:
counter()inside::scroll-marker { content }produces "1, 2, 3…" automatically;:target-currentstill picks out the active one. -
Marker style foundry
Three preset stylings on the same carousel — dots, numbers, thumbnails — toggle live. The carousel is just a snap container; markers, focus, and arrow-key navigation come from the pseudo.
-
Progress Tracker
A 5-step onboarding flow using
::scroll-marker-groupand::scroll-marker:checkedas a native step indicator. Configure marker shape, active color, scale, and type (dots vs numbers) live. Zero JavaScript for the active-step tracking. -
Tabbed sections
A five-tab documentation UI where each panel emits its own
::scroll-markertab button viacontent: attr(data-tab).::scroll-marker-group: beforecollects them into the tab bar.:target-currentstyles the active tab. No JavaScript, no ARIA sync, no click handlers — keyboard navigation included.
why it shipped
Authors need to be able to easily create a set of focusable markers for all of their items, or pages of items when combined with automatic fragmentation.