












I’ve been doing more front-end coding this year than I have in a while and every time I come back to write markup and CSS, it feels like there are new tricks. We’re closing in on the 30th anniversary of CSS (already a little past 30 years since Håkon Wium Lie proposed it) and it still feels like actual magic.
When I was first making websites (I’m just skipping over the part where I put a year on that, thanks), I used tables for layout and a pile of spacer gifs. Then I would make them look nice with the little CSS I knew. I was mostly slapping things together back then, not fully understanding semantics, page weight, or the cascade. In time I learned how to do things properly from Eric Meyer’s Definitive Guide, and multiple CSS books by Dan Cederholm. I typed color: red; and a thing turned red. No compiling or build steps. It was declarative and made me feel like a wizard (it was a much lower bar for wizardry back then).
Over the years since then, and especially in the last decade-ish, CSS has exploded! Flexbox, grid, many kinds of viewport units, variables, and on and on. So many things we used to patch in to extend CSS or turn to Javascript for are now just part of the spec. The ease with which you can create a flexible type scale or size elements and spacing responsively with clamp… the screen has really matured into its own unique design medium with tailored affordances that aren’t just translations from another medium (print). CSS finally gave the web its own grain.
And the real crazy part is that my bad decades-old code still renders fine in today’s latest web browsers! I would be sad if it didn’t, but I also wouldn’t be surprised. How is this stuff still backwards compatible!?
How much of your software from 20 years ago runs on your devices today? I realize CSS is actually “software”, but it is a kind of user interface for making stuff. Most things in tech get worse as time goes on, filled with upsells and ads, or sparkle icons to try out some rad new agent surreptitiously shoved into an app. CSS gets better with age and as more features are added. That’s bananas!
Of course this is because of wonderful people continually making it better. Like Rachel Andrew, Miriam Suzanne, Jen Simmons, Lea Verou, and folks on the CSS Working Group who continue refining and expanding the CSS spec, and many others at companies making the browsers that run our code.
Though, I’ve got my eye on some browsers blithely bellyflopping into enshittification. I know many things are shit in the world right now, and there is a lot in tech making outsized contributions to that. But CSS continues to be a surprising light to me, and I want to celebrate something incredible that keeps improving because people care. CSS is a goddamned marvel.
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。