does anyone know why raising specificity in css could lead to problems?

Kevin Powell
YouTube
Use future CSS features in your code right now!
CSS is growing up so fast, and thanks to PostCSS and the postcss-preset-env we can use a lot of upcoming features today, like custom media queries, custom selectors, and nesting! 🔗 Links ✅ My video on setting up PostCSS: https://youtu.be/ohJcZW60br0 ✅ Alex Trost's YouTube: youtube.com/c/AlexTrosts ✅ Alex Trost's Twitch: https://www.twitch.t...
2 Replies
13eck
13eck2y ago
Basically the more specific a selector the harder it is to override when you need to. A side effect that’s not really talked about is file size: super specific selectors take up more bytes the user downloads and could impact performance.
Aozen
Aozen2y ago
mmm thank you!