scroll-marker-group
Limited availability71% of usersExperimental
Gives a scroll container a ::scroll-marker-group, the box that holds a carousel's navigation dots. before places it just ahead of the container and after places it just after. The default, none, creates no group. Each item's ::scroll-marker then goes into that group. The spec also has links and tabs modes, but browser data only lists none, before and after so far. It works in Chrome, Edge and Samsung Internet so far.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyComingNot in Firefox or Safari yet, so not every major browser supports it.
See how modern your own CSS is.Check your CSS →
Quick facts
- Initial value
none- Inherited
- No
- Applies to
- scroll containers
- Animation type
- discrete
Quick example
.carousel {
display: flex;
overflow-x: auto;
scroll-snap-type: x mandatory;
scroll-marker-group: after;
}
.carousel::scroll-marker-group {
display: flex;
justify-content: center;
gap: 8px;
}
.carousel > li::scroll-marker {
content: "";
width: 10px;
height: 10px;
border-radius: 50%;
background: #ccc;
}
.carousel > li::scroll-marker:target-current {
background: #333;
}Values
nonebeforeafterlinkstabsRelated snippet
Carousel navigation without a JavaScript libraryLayout →scroll-marker-group browser support
BaselineLimited availabilityThis feature is not Baseline because it does not work in some of the most widely-used browsers.Not ready for production without a fallback.
Usage71%of people can use this29% use a browser without it.
Browsers
135+
135+Mobile
135+Android