CSS nesting is (almost) ready
I’ve been hearing a lot about CSS nesting, but I figured that it was still years away from being ready for use even on a site like this.
But a quick check of Can I Use shows that it
is ready in all major browsers. Even more if you make sure to use the &
nesting selector.
Try it out for yourself:
So should you start using CSS nesting today? Probably not. But it is almost ready, and that’s exciting. Variables and nesting are the two features that would still draw me to a preprocessor like Sass or Less. We’ve had native custom properties for years, and now we are so close to being able to use nesting.
Exciting times!