v132 · css
::scroll-button() pseudo elements
Allow the creation of interactive scroll buttons as pseudo-elements, e.g.
concepts
-
::scroll-button()
Declarative previous/next buttons for scroll-snap carousels.
-
gallery + vertical
All four directions and the auto-applied
:disabledstate, in a real image gallery + vertical stack. -
Carousel Navigation
Two carousels styled purely with
::scroll-button(inline-start/end)— no JavaScript needed. Side-by-side before/after showing how much boilerplate the pseudo-element replaces. -
orientation modes
All four direction families — physical left/right, physical up/down, logical inline-start/end, logical block-start/end — demoed side-by-side with snippets.
-
Data Table Nav
A wide data table with
::scroll-button(inline-start/end)arrows for keyboard-accessible horizontal navigation. The browser automatically disables the left arrow at the start and the right arrow at the end — no JSclickhandlers, no manualscrollevent listener to disable buttons at the edges.
why it shipped
Allow the creation of interactive scroll buttons as pseudo-elements, e.g.