:has-slotted
Limited availability2% of users
Matches a 'slot' in the Shadow DOM if it contains content that matches the selector. It's used within Web Components to style slots based on what's been put inside them.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyComingNot in Chrome, Edge or Safari yet, so not every major browser supports it.
See how modern your own CSS is.Check your CSS →
Quick example
/* Styles the slot if it has an image inside it */
::slotted(div):has-slotted(img) {
border: 4px solid blue;
}:has-slotted 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.
Usage2%of people can use this98% use a browser without it.
Browsers
136+Mobile
136+Android
Interop 2027 candidate. Tracked for Interop 2027. Official focus areas publish early 2027; proposals are open through September 2026. See Interop 2027 →