:openBaseline · Newly available
The :open CSS pseudo-class matches elements that have open states, like <details>, <dialog>, or <select>, based on their state.
Works in the latest version of every major browser, but older devices may not support it yet. Baseline since May 11, 2026.
Browser support
DesktopChrome
1–132Not supported
133+Supportedsince Feb 4, 2025
Current: 155Edge
12–132Not supported
133+Supportedsince Feb 6, 2025
Current: 154Firefox
1–135Not supported
136+Supportedsince Mar 4, 2025
Current: 157Safari
1–26.4Not supported
26.5+Supportedsince May 11, 2026
Current: 27MobileChrome Android
18–132Not supported
133+Supportedsince Feb 4, 2025
Current: 155Firefox Android
4–135Not supported
136+Supportedsince Mar 4, 2025
Current: 157Safari iOS
1–26.4Not supported
26.5+Supportedsince May 11, 2026
Current: 27How to use
Every current browser supports this, but it only became Baseline on May 11, 2026. Use it as a progressive enhancement, or keep a fallback if you support older devices.
Example
Full syntax and examples are on MDN: :open.
Feature detection
CSS · check before using
@supports selector(:open) {
/* styles that use :open */
}
/* or in JavaScript */
if (CSS.supports("selector(:open)")) {
// use it
}