:open
Newly availableSince 202690% of users
Targets elements that are currently in an 'open' state, such as a <details> element that is expanded or a <dialog> that is visible.
What's modern
From web-features, MDN's browser data and our snippets, checked dailyModernIn every major browser since May 2026. Widely available around November 2028.
See how modern your own CSS is.Check your CSS →
Quick example
details:open {
/* Adds a top border to the content box only when the details are open */
border-top: 2px solid #3b82f6;
}Related snippet
Animating details open and close without measuring heightAnimation →:open browser support
BaselineNewly availableSince 2026 this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.Works in all modern browsers. May need a fallback for older browsers.
Usage90%of people can use this10% use a browser without it.
Browsers
133+
136+
26.5+
133+Mobile
133+Android
136+Android
26.5+iOS
Interop 2026 focus area. All major browsers are actively working to fix cross-browser inconsistencies for this feature in 2026. Learn more →