CSS :where() Selector

❮ Previous Selectors Next ❯

Example

:where(p.example) a {
  color: red;
}

Meaning

The :where() selector function takes a selector list as its argument, and selects any element that can be selected by one of the selectors in that list.

The difference between :where() and :is() is that :where() always has 0 specificity, whereas :is() takes on the specificity of the most specific selector in its arguments.

Version: CSS3




Standard Syntax

:where(complexSelectorList) {
  css declarations;
}



Browser Support

The numbers in the table specify the first browser version that fully supports the property.




Status







❮ Previous Selectors Next ❯