:target-current
Limited availability73% of usersExperimental
An experimental pseudo-class that matches the 'scroll marker' corresponding to the item currently visible in the viewport. This is the 'active' state for carousel indicators.
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 example
.carousel::scroll-marker:target-current {
/* Highlights the indicator for the currently visible slide */
background-color: var(--brand-active);
transform: scale(1.2);
}:target-current 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.
Usage73%of people can use this27% use a browser without it.
Browsers
135+
135+Mobile
135+Android