
Stop using CSS preprocessor!
CSS nesting is now natively supported.
If you were using a preprocessor only for this feature,
It might be time to go back to plain CSS.
(Otherwise you can stick with it).
1/ No build tools required
- It makes the development setup easier.
- It also reduces the project’s build time.
2/ Reduced file size
- Sass expands rules during compilation, increasing the final CSS size.
- CSS nesting doesn’t expand rules, resulting in smaller CSS.
Browser support is already strong at 91.3%.
But keep in mind that unsupported browsers will fail to parse nested rules.
If you need full compatibility, consider using a build step until support is universal.
If nesting was the only thing keeping you tied to a preprocessor… maybe it’s time to go vanilla.
To learn more tips about CSS, make sure to join my newsletter below ❤️