:where()
noun
say it: “KOH-lun WAIR” /ˈkoʊlən wɛər/
A functional pseudo-class that matches like :is() but always counts zero in specificity, so any later rule can override it. It suits default styles.
What does :where() do?
:where() works like :is() but adds no specificity, so its styles are easy to override. It is handy for defaults.
:where(ul, ol) { padding-left: 1.5rem; } /* any class can override this */
In a sentence
- “I wrote my default link styles inside :where(), so any class on a link beats them without a fight.”
Level: Freelancer · More CSS terms at this level
Updated