← TechnologyThe essentials of

:where() sets a style with zero specificity

Publisher: ResumeMaker • 1 source

Published: 22 Oct 2026 13:13 · Updated: 22 Oct 2026 13:13

AI source check: 21 Oct 2026 13:48. This is not editorial approval.

In a few sentences

In brief

It is suitable for initial rules, which components easily replace.

Useful to know

:where() selects items by list of selectors, but the pseudoclass itself and its arguments always have zero specificity. [1]

For example, :where(.article) a { color: navy; } receives a weight from a, until the shell increases it. Later, .special-link can set another color without a long chain of classes. This is useful for base themes and libraries. Zero specificity does not override the other rules of the cascade: origin, importance, and layers are also involved in choosing a winning declaration.

Sources

For further detail and to check the information:

  1. [1] MDN — :where ↗