::part
Widely availableSince 202097% of users
A selector used inside a Shadow DOM that allows you to style specific internal pieces of a web component from the outside (the 'global' CSS).
What's modern
From web-features, MDN's browser data and our snippets, checked dailyModernIn every major browser since July 2020. Widely available since January 2023.
See how modern your own CSS is.Check your CSS →
Quick example
my-custom-component::part(button) {
/* Styles the 'button' part exposed by the web component's shadow tree */
background: var(--brand-color);
border-radius: 8px;
}::part browser support
BaselineWidely availableThis feature is well established and works across many devices and browser versions. It has been available across browsers since 2020.Safe to use without fallbacks.
Usage97%of people can use this3% use a browser without it.
Browsers
73+
72+
13.1+
79+Mobile
73+Android
79+Android
13.4+iOS