pseudo-class
:where() — CSS reference
Matches like is(), but the whole function contributes zero specificity, including its arguments. Useful for defaults that consumers can override.
Formal Syntax & Structure
css syntaxcss
:where(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:where(.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>