🦸 Become A VS Code SuperHero Today: https://vsCodeHero.com
🧑🏾🤝🧑🏽 Join my Discord developer community: https://discord.gg/A9CnsVzzkZ
If you’re not familiar with Sass or Less, these give you the ability to nest CSS selectors within selectors, allowing you to write more modular and maintainable stylesheets.
For a long time, a big reason to use Sass was that it has the ability to use variables. But now CSS has variables too.
Just like that, CSS will soon have selector nesting as well!
This feature is currently in draft and is not supported by browsers yet. But, in this video, I’ll show you how you can use it today.
– W3C Draft: https://drafts.csswg.org/css-nesting-1/
– PostCSS Nesting Package: https://github.com/csstools/postcss-nesting
– Vite.js: https://vitejs.dev/
💻 Visit CodingPhase and get unlimited access to programming courses plus 20% 0FF!!
🤖 Get FREE AI-powered code completions from Kite: https://www.kite.com/get-kite/?utm_medium=referral&utm_source=youtube&utm_campaign=codestackr&utm_content=description-only
🛠️ Tools I use:
🟠 codeSTACKr Theme: https://marketplace.visualstudio.com/items?itemName=codestackr.codestackr-theme
🟠 STACKr Code Font (Exclusive to my VS Code Course – https://vsCodeHero.com)
🟠 SuperHero Extension Pack: https://marketplace.visualstudio.com/items?itemName=codeSTACKr.superhero-extensions
⏱️ Timestamps ⏱️
00:00 – Intro
00:34 – What is Nesting?
00:57 – The "&"
01:46 – @nest
02:22 – Conditional Rule Nesting (@media)
02:51 – How Can We Use This Today?
03:15 – Vite Set Up
03:59 – Cleanup & HTML / CSS
06:00 – PostCSS Configuration
07:07 – Let’s Nest!
💖 Show support!
👀 Watch Next:
Playlist: Web Development For Beginners – https://www.youtube.com/watch?v=Ez4yHS2dsN8&list=PLkwxH9e_vrAJ0WbEsFA9W3I1W-g_BTsbt
🌐 Connect With Me:
** Affiliate Disclaimer: Some of the above links may be affiliate links, which may generate me a sales commission at no additional cost to you.
#codeSTACKr #CSS #Vitejs