MENU

Fun & Interesting

These CSS features give us more control on the cascade and specificity

Kevin Powell 21,474 1 year ago
Video Not Working? Fix It Now

Looking to step up your CSS? I have free and premium courses 👉 https://kevinpowell.co/courses?utm_campaign=general&utm_source=youtube&utm_medium=moderncascade A very big thank you to Geoff Graham for his help in making this video possible! https://geoffgraham.me/ 🔗 Links ✅ More on svh/dvh/lvh: https://youtu.be/ru3U8MHbFFI ✅ More on specificity: https://youtu.be/c0kfcP_nD9E ✅ More on :is() :where() and :has(): https://youtu.be/3ncFpP8GP4g ✅ More on layers: https://youtu.be/NDNRGW-_1EE ✅ More on feature queries @support: https://youtu.be/wPI8CEoheSk ✅ Browser support for :has(): https://caniuse.com/css-has ✅ Browser support for layers: https://caniuse.com/mdn-css_at-rules_layer ✅ Browser support for @scope: https://caniuse.com/css-cascade-scope ⌚ Timestamps 00:00 - Introduction 01:40 - Order basics 03:10 - Debugging order 04:18 - Order linting 05:55 - Invalid declarations & debugging them 07:40 - Using order and invalid declarations on purpose 10:26 - Feature queries @supports 12:45 - Specificity intro 13:45 - Specificity basics 15:18 - Debugging specificity 16:40 - Modern selectors impact on specificity 24:00 - Cascade Layers introduction 24:38 - Cascade Layers basics 27:25 - Debugging layers 28:45 - Declaring layers before using them 31:28 - The impact of !important on layers 33:30 - Combining layers with “unlayered” styles 34:28 - Introduction to scope 36:04 - Scope basics 40:50 - Using scope with style elements inside an element #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 of what's coming up on my YouTube channel, make sure to follow me on Instagram and Twitter. Twitter: https://twitter.com/KevinJPowell Codepen: https://codepen.io/kevinpowell/ Github: https://github.com/kevin-powell --- And whatever you do, don't forget to keep on making your corner of the internet just a little bit more awesome!

Comment