Skip to main content

Harshal V. LADHE

The CSS :open Pseudo-Class

Styling the open state of `<details>`, `<dialog>`, `<select>` and picker inputs with `:open`, and how it differs from `[open]`.

Content tagged open-pseudo-class

  • Tutorial:The :open Pseudo-Class for <details>, <dialog> and <select>

    Style anything that opens, selects included, with one pseudo-class.
    Style the open state of <details>, <dialog> and <select> with the CSS :open pseudo-class. Compare it with [open], :popover-open and :modal, with fallbacks.
    Published at:
    Categories:CSS
    Estimated reading time:11 min read