demo · v135

::scroll-button() in the wild

Chrome 135 lets a scroll container generate prev/next buttons as pseudo-elements. No DOM wrappers, no JS — the browser owns scrolling. The carousel below uses the real pseudo on Chrome 135+; falls back to wired-up buttons elsewhere so you can compare.

::scroll-button(): ?

the code

.carousel::scroll-button(left)  { content: "‹"; }
.carousel::scroll-button(right) { content: "›"; }

see also