14:13:where() - Remove the specificity of ANY selector with this pseudo-class
From the creator
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: https://youtu.be/c0kfcP_nD9E ✅ My video on :is() - https://youtu.be/McC4QkCvbaY ✅ More information on :where() and :is() - https://developer.mozilla.org/en-US/docs/Web/CSS/: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 💬 https://discord.gg/nTYCvrK Keep up to date with everything I'm up to ✉ https://www.kevinpowell.co/newsletter Come hang out with me live every Monday on Twitch! 📺 https://www.twitch.tv/kevinpowellcss --- Help support my channel 👨🎓 Get a course: https://www.kevinpowell.co/courses 👕 Buy a shirt: https://teespring.com/stores/making-the-internet-awesome 💖 Support me on Patreon: https://www.patreon.com/kevinpowell --- My editor: VS Code - https://code.visualstudio.com/ --- I'm on some other places on the internet too! If you'd like a behind the scenes and previews
Published 2021-05-13 · Watch on YouTube ↗
Availability and playback restrictions are controlled by the original channel.





