Grouping & the :is() / :where() Selectors
Grouping selectors let you apply the same rule to multiple targets without repeating declarations. CSS also provides functional pseudo-classes that make complex grouping easier.
Classic Comma Grouping
Separate any number of selectors with commas. If one selector in the list is invalid, the entire rule is discarded in older engines.
:is() Pseudo-Class
:is() accepts a forgiving selector list — an invalid selector inside is simply ignored rather than killing the whole rule. Its specificity equals the most-specific selector in its argument list.
:where() Pseudo-Class
:where() behaves like :is() but always has zero specificity, making it ideal for reusable base styles you never want to fight against later.