HTML & CSS · Middle · Question 25 of 75
What is the specificity of :where(.card, #hero) p?
- 1(1, 0, 1) - the most specific argument of
:where()is used - 2(0, 1, 1) - the first argument is used
- ✓Correct answer: (0, 0, 1) -
:where()always contributes zero specificity
Explanation
:where() zeroes out the specificity of its arguments, leaving only p - (0,0,1). That's handy for base styles in libraries: they are easy to override. Its sibling :is() takes the specificity of its most specific argument - :is(.card, #hero) p would be (1,0,1).