CSS nesting: use with caution
February 4, 2025
There are features that fill me with dread though and right at the top of that list is native CSS nesting. I know that opinion will be rather unpopular, but the whole deal of the site is front-end education for the real world, so I’m here to provide that for you today.
CSS pre-processors highlighted many aspects of CSS developers wanted but which had not yet arrived in the spec.
In the last decade or so, we’ve seen a lot of the most popular pro-processor features come to CSS itself, including CSS nesting.
But as the adage goes, be careful what you wish for argues Andy Bell-this may not work exactly as you expect.