← TechnologyThe essentials of

The specificity of :is() comes from its arguments

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

A short list of selectors can get unexpectedly large weight.

Useful to know

The pseudoclass :is() gathers alternative selectors in one position. Its specificity is determined by the strongest selector on the list, not just by the one who actually matched. [1]

Example: :is(.card, #featured) a includes a ID weight for the entire selection. This can make it more difficult to subsequently replace a style for links in a regular map. If the goal is a general rule with an easily changeable priority, consider :where(). Shortening a record should not hide a change in the behavior of the cascade.

Sources

For further detail and to check the information:

  1. [1] MDN — :is ↗