:open pseudo-class
Baseline 2026 newly available (Chrome 133, Firefox 136, Safari 26.5).
Chrome 133
Edge 133
Safari 26.5
Firefox 136
Matches `<details>`, `<dialog>`, `<select>` and date/color inputs while they are open, replacing `[open]` attribute selectors and giving the only way to style an open native `<select>`.
Details toggle
Body text.CSS
.fx-028 {
font-family: system-ui;
display: grid;
gap: 12px;
max-width: 260px
}
.fx-028 details,.fx-028 select {
border: 1px solid #bbb;
border-radius: 8px;
padding: 8px
}
.fx-028 :open {
border-color: #2563eb;
box-shadow: 0 0 0 3px #2563eb33
}
.fx-028 :is(a,button,input,select,textarea):focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
HTML
<div class="fx-028">
<details><summary>Details toggle</summary>Body text.</details>
<select><option>One</option><option>Two</option></select>
</div>Fallback: Use `details[open]` / `dialog[open]` alongside it for older browsers; `<select>` open state simply is not styled.
Prompt
Style open states with the `:open` pseudo-class (works on details, dialog, select and picker inputs) rather than `[open]` attribute selectors. Keep `[open]` as a duplicate selector only if you support browsers older than Safari 26.5.