With the release of Chrome 135, web developers finally get access to two powerful new pseudo-elements:
::scroll-button()
::scroll-marker()
These pseudo-elements unlock fully functional carousels, sliders, and scrollable components without a single line of JavaScript.
TL;DR: These new features make interactive scroll experiences accessible, stylable, and keyboard-friendly — all from your CSS file.
🆕 What Are ::scroll-button()
and ::scroll-marker()
?
::scroll-button()
This pseudo-element renders scroll control buttons — left/right or up/down depending on the scroll direction. You can style them like any element, and users can interact with them out of the box.
::scroll-marker()
Think of this like scrollable radio dots — showing the position of each scroll snap point. They’re interactive, accessible, and visual indicators of your scroll progress.
Why They're a Big Deal
- ✅ Automatically accessible (screen reader + keyboard support)
- ✅ Pairs with
scroll-snap-type
- ✅ No JavaScript needed
- ✅ Fully stylable using CSS
🔥 Real-World Carousel Example (JavaScript Fallback)
Here’s a simple JavaScript-based carousel (for legacy support), which will soon be entirely CSS-driven using ::scroll-button()
and ::scroll-marker()
in Chrome 135+:
<!-- Full working demo with scroll + JS -->
<div class="carousel">
<!-- Slides -->
</div>
[Full code example here... already shown above]
💡 What This Will Look Like in Pure CSS
.scroll-container::scroll-button(start) {
content: '◀';
position: absolute;
left: 0;
top: 50%;
transform: translateY(-50%);
}
.scroll-container::scroll-button(end) {
content: '▶';
position: absolute;
right: 0;
top: 50%;
transform: translateY(-50%);
}
No JavaScript. No event listeners. Just drop in a scroll-snap
container, and the browser handles it.
🎯 Why This Matters
Using ::scroll-button()
and ::scroll-marker()
means:
- ✅ Native accessibility (no ARIA hoops to jump through)
- ✅ Built-in keyboard support
- ✅ Zero JS needed for sliders
- ✅ Smaller bundle sizes, better perf
🧪 Browser Support (as of Chrome 135)
Browser | Support |
---|---|
✅ Chrome 135+ | Full |
⚠️ Edge (Chromium) | Behind flag |
❌ Firefox | Not yet |
❌ Safari | Not yet |
To enable the feature in Chrome manually:
chrome://flags/#enable-experimental-web-platform-features
🧠 Final Thoughts
This is a huge leap for native web components. Once Firefox and Safari catch up, we’ll finally have fully accessible carousels and sliders without needing bloated libraries or JS hacks.
Until then — progressive enhancement is your best friend.
🙋♂️ Let’s Talk!
What would you build with ::scroll-button()
?
- A portfolio carousel?
- A product slider?
- An onboarding walkthrough?
Should developers ditch JS sliders forever? Or is it too early?
👉 Try the full responsive carousel demo:
🔗 https://clever-cocada-9cd821.netlify.app/
Follow me for more frontend deep dives!
#CSS #HTML #Chrome135 #Frontend #WebDev #Accessibility #scrollbutton #nativecarousel #DevTo
Here’s something exciting: Dev.to is distributing free tokens for our top content creators. Visit the claim page here. wallet connection required. – Dev.to Community Support