The hosts dive into the exciting world of CSS nesting, highlighting its benefits for cleaner, more organized code. They discuss when to use nesting effectively, warning against overdoing it just for style's sake. The conversation also touches on nested media queries, showcasing how they enhance stylesheet functionality. With insights on tools like PostCSS and comparisons to preprocessors, listeners are encouraged to embrace nesting for better development practices while avoiding common pitfalls.
20:13
forum Ask episode
web_stories AI Snips
view_agenda Chapters
auto_awesome Transcript
info_circle Episode notes
insights INSIGHT
CSS Nesting Arrives
CSS nesting, similar to preprocessors like Sass, is coming to CSS.
This simplifies selector writing and reduces redundancy, a feature long desired by developers.
volunteer_activism ADVICE
Nesting Draft Status
Don't use CSS nesting in production yet; it's currently a draft.
While the draft is likely stable, it's important to wait for browser support to solidify.
insights INSIGHT
Nesting Benefits and Risks
Nesting makes CSS easier to read, write, and refactor by reducing string duplication.
Overuse can create overly specific and hard-to-maintain code.
Get the Snipd Podcast app to discover more snips from this episode
In this Hasty Treat, Scott and Wes talk about CSS nesting — what it is, when to use it, and why.
Prismic - Sponsor
Prismic is a Headless CMS that makes it easy to build website pages as a set of components. Break pages into sections of components using React, Vue, or whatever you like. Make corresponding Slices in Prismic. Start building pages dynamically in minutes. Get started at prismic.io/syntax.
Sentry - Sponsor
If you want to know what’s happening with your code, track errors and monitor performance with Sentry. Sentry’s Application Monitoring platform helps developers see performance issues, fix errors faster, and optimize their code health. Cut your time on error resolution from hours to minutes. It works with any language and integrates with dozens of other services. Syntax listeners new to Sentry can get two months for free by visiting Sentry.io and using the coupon code TASTYTREAT during sign up.