CSS’ comeback

CSS seems to be making a comeback. For the longest time the website styling language was made fun off. The odd one out.

But I think that is slowly changing. It’s cool again to ship websites without javascript, and new features and languages make that possible. Four trends:

  1. Driver - Everything is a web-app: style once, a UI everywhere. Even most desktop apps are actually web-apps in disguise. This means that if you can create a (lightweight) great user experience in CSS, it will automatically translate to loads of different distributions of your app.
  2. CSS features: CSS is growing. It does so a little awkwardly, with different interpretations across browsers, but still, new features are added. Features like flex, grid, position:sticky already improved CSS a lot. But new features like subgrid, nesting, and animation:scroll, allow for shipping even less javascript.
  3. Zero javascript: javascript has its ups and downs, we seem to be in a ‘down’ where client-side javascript is concerned. The less javascript, the better. Frameworks like Astro have made that easier and hyped, and I like that developers take pride in the efficiency of their websites.
  4. Meta CSS tooling: CSS has always been weird and unintuitive for styling anything other than a simple website. Tools like tailwind and ... allow developers to use CSS with a bit more intuition. The beauty of these tools is that they simplify the process of building a beautiful website. Thus ‘inviting’ more and more styling optimisation and CSS tinkering.

CSS evolves as an effort of the World Wide Web Consortium. Each browser (engine) interprets CSS a little bit differently. While CSS implementation still differ slightly between largest engines Chromium and WebKit, they are optically not that different.

I’m impressed with how CSS is evolving, while maintaining backward compatibility. I like the example from last week where the webkit team asks for feedback. And in general - I like CSS. I’ve learned to be good at it, despite the weirdness. I like how tailwind and all these CSS features make it easier and easier to ship websites that behave (more or less) consistently across web, mobile and desktop apps.