pseudo-class

:is() — CSS reference

Matches any valid branch of a forgiving selector list. Specificity is the highest among its valid arguments, not merely the branch that matched. Pseudo-elements are not accepted.

Formal Syntax & Structure

css syntaxcss
:is(selector-list)

Working Example

Example Snippetcss
<!doctype html><html lang="en"><head><meta charset="utf-8"><title>Selector lab</title><style>:where(.sample) { color: rgb(32, 32, 32); }p:is(.notice, #absent) { color: rgb(0, 96, 80); }</style></head><body><p id="a" class="sample notice">A</p><p id="b" class="sample muted">B</p></body></html>
CSS Reference