Andy Bell has been obsessed with one particular CSS snippet for years now. In this post, he shares it with us and shows us how he’s recently improved it further by using Custom Properties.
Andy Bell writing for Smashing Mag:
The present and future of CSS are very bright indeed and if you take a pragmatic, progressive approach to your CSS, then things will continue to get better and better on your projects, too. In this article, we’ll look into masonry layout,
clamp(), ch and ex units, updated text decoration, and a few other useful CSS properties.
Andy Bell recently shared his new CSS methodology oriented towards simplicity and consistency with “a heavy dosage of pragmatism.”
The problem is, a huge number of projects are websites, so that advice normally doesn’t work for the vast majority of developers. For context, it’s estimated that WordPress powers around 36% of the internet and is still rising. Compare that to a paltry 0.3% of websites that use React, for example. It’s important to keep those figures in mind.
If you’re deep in CSS, you’ll want to read the whole post. Andy goes on to explain the methodology and how he writes CSS, then wraps up saying…
This isn’t a heavily documented, complex methodology. Well, not now, anyway. It’s more of a concept method of organizing CSS just enough to not pull to far away from the “classic” way of writing it. Really, it’s more of a thinking structure.
Andy makes three compelling arguments in favor of CSS. This conversation is ever more critical as our industry grows and matures.