# :open pseudo-class

Status: Baseline 2026 newly available (Chrome 133, Firefox 136, Safari 26.5).  
Source: https://web.dev/blog/baseline-digest-may-2026  
Page: https://designforai.dev/css/open-pseudo-class

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>`.

## HTML

```html
<div class="fx-028">
  <details><summary>Details toggle</summary>Body text.</details>
  <select><option>One</option><option>Two</option></select>
</div>
```

## CSS

```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; }
```

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.
