Remove the specificity of ANY selector with this pseudo-class
The new :where() pseudo-class is the brother of :is(), which I looked at not to long ago. Unlike :is(), anything inside of it has *no impact* on specificity. That got me thinking... I mean, that means we can make ANY selector we want have zero specificity by sticking it inside a :where()! Is that a terrible idea, would it work well for defaults that we want to overwrite later on? Let me know what you think in the comments.
🔗 Links
✅ More info on specificity:
✅ My video on :is() -
✅ More information on :where() and :is() - :where#comparing_where_and_is
⌚ Timestamps
00:00 - Introduction
01:23 - the problem is :is()
03:26 - using :where()
04:26 - specificity battles
07:06 - creating 0 specificity defaults
#css
--
Come hang out with other dev’s in my Discord Community
💬
Keep up to date with everything I’m up to
✉
Come
1 view
4
1
4 days ago 00:08:15 87
HISTORIQUE! Trump signe le décret pour déclassifier les dossiers des assassinats de JFK, MLK et RFK.
5 days ago 00:03:29 1
Voice Actor, Squu - Lust is Stronger Than Us
1 week ago 00:06:10 16
Bongo Alan - A1 Bongo The Barbarian (African Drummer Mix) (Bongo The Barbarian EP)