:open

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

The :open CSS pseudo-class represents an element that has open and closed states, only when it is currently in the open state.

Syntax

css
:open {
  /* ... */
}

Description

The :open pseudo-class selects any element currently in the open state, which includes the following elements:

Result