CSS: selector list (,)
Selector List
s1, s2, etc-
Match any s1, s2, etc.
s can be simple selector, compound selector or complex selector.
🛑 WARNING: if one of the selector is invalid (such as pseudo-element selector with a typo), the whole block are ignored. better is to use
:where(). CSS: :where selector (is any of)/* make red of all div of class x, or any span: */ div.x, span { color: red; } /* same as */ div.x { color: red; } span { color: red; }
Syntactic grouped Selector List
you can also use
:is()
and
:where().
they are similar.