Justice for CSS

In defense of the girliest programming language.
Illustration of character being created with CSS programming language
Illustration: Aaron Fernandez

The first S in CSS stands for “style.” Think colors and fonts, borders and shadows, rows and columns, animations and transitions. CSS is the programming language that makes a website look pretty (or pretty ugly, often). It’s what makes this very webpage look like itself—look WIRED.

One paragraph in, a certain reader will already be smarting at my description of CSS. “It’s a style sheet language,” I can hear them say, “not a programming language.” (The second S indeed stands for “sheets,” and the C, if anyone cares, for “cascading.”) Or, “it’s a domain-specific language, not a general-purpose language.” Also, “it doesn’t execute” and, of course, “it’s not Turing complete” (although ). Granted, CSS is a little different. There’s no compile step, and it doesn’t throw errors at run time like other languages. But that’s all beside the point.

The gatekeeping over whether CSS is a “real” programming language exists partly because it’s so simple to start—anyone can grok “background: red” right away. But simple does not mean easy, as the programmer-writer Jeremy Keith observed, and calling CSS easy or unserious should be tired by now. There were about 50 properties in the initial CSS specification in 1996 (like “color” and “font-size”); today there are at least 10 times as many (get ready for “hanging-punctuation”). The language has changed so much in three decades, and by now it is just so capable. One programmer recently re-created Doom in CSS. Others have used it to build holographic Pokémon cards and 3D-rendering engines. Cassidy Williams, who competed in this year’s inaugural March MadCSS tournament, built an experimental database-query engine entirely in CSS. When she demo’d it at Microsoft Build, even the emcees—seasoned programmers themselves—took a cheap shot at CSS. “You’re one of the people that likes it,” they snarked. “You might be the only one.”

Why is the lore of JavaScript’s creation so famous (Brendan Eich, Netscape, 10 days) and yet hardly any programmer would recognize the name of CSS creator Håkon Wium Lie? It might have something to do with Lie being a Norwegian guy with a diacritic in his name, not an American in Silicon Valley like Eich nor a Brit like Tim Berners-Lee, who invented HTML. And to be fair, JavaScript and HTML each have a chip on their own shoulder to worry about. But in the browser’s holy ternary of JavaScript-​HTML-CSS, people tend to treat CSS as less than or purely decorative. Styling can be decorative—and wonderfully so—but the legibility and rich design it affords are important. People care how things look!

There’s another, uglier explanation for the CSS disrespect: It’s considered a “feminine” language. CSS developers work on the frontend—the part of a website you can actually see. There’s the obvious undertone that dealing with style and beauty is Female Work, along with the recycled joke that a CSS developer is “a freak in the style sheets.” How seriously a language is taken has knock-on effects on programmer salaries, what skills are sought out and tested in job interviews, and how accessible websites are for people with disabilities.

I recently talked to a friend, a talented backend engineer, about this. In college, she got an internship at a reputable software company in San Francisco doing entirely backend work. “I’d never expressed any interest in frontend at all, almost to an extreme extent,” she told me. “I don’t like frontend.” And yet, when she joined the company full-time after graduation, she was immediately assigned … a frontend role. She eventually worked her way back to the backend, and by now she’s used to the skepticism. “I’ve been in a million and one conversations with the classic man engineer who doesn’t think I know what I’m talking about until they work with me for six months and see my first backend project.”

I didn’t know this specific story when I first asked my friend if, maybe, I dunno, she had any experience with people assuming she was a CSS girlie. But the “coincidence” is really more of a probability. To overcorrect for such situations, she’s taken to branding herself as unmistakably backend-y. When we worked together, whenever it came time to distribute tasks among our team, she made it quite clear that she did not want to touch the frontend. (I don’t think we ever played Nose Goes, but that was the spirit.) I’d have been seriously obtuse to make the same mistake her manager did.

That same friend used to teach at Kode With Klossy, a tech camp for young women and gender-expansive students started by supermodel Karlie Kloss. Her experience there was all about the other, optimistic side of the coin: CSS can be a gateway into software for those who don’t fit the nerdy-computer-boy stereotype. “These girls would come in who had no interest in coding but just thought that Karlie Kloss was cool, and they would have so much fun,” she said. “They would grow to care more about, like, OK, how does this work?”

Within the industry, the Klossy approach is reflected in slightly better (but still really bad) gender diversity in front-of-the-frontend engineering jobs, compared to back-of-the-frontend and pure backend roles. Of a few thousand respondents in the State of CSS survey last year, 11 percent were women and 3 percent were nonbinary or gender-nonconforming. Pathetic, I know. But the State of JavaScript reported only 6 percent female and 1 percent nonbinary.

Another downstream consequence of CSS neglect is the sameness of websites across the internet, especially in Startup-land. If CSS is what makes a website look like itself, then the more recent fast fashion of frameworks is what makes them all look alike. There was a Bootstrap era, a Tailwind look, and now a distinctive Claudeslop aesthetic. Frameworks are athleisure, and if you’re not into fashion, they’re a shortcut to looking OK. Fair enough. But it does bum me out, in the same way the grayification of American cars bums me out compared to those old photos of technicolor parking lots.

WIRED was one of the first major, high-traffic sites to adopt CSS. It was a “Site for Your Eyes,” WIRED declared, and it was. But back then, there was no Flexbox nor Grid, no custom properties, and no @keyframes, transitions, and transforms for JavaScript-free animations. In this decade alone, so many powerful CSS features have landed in browsers that it’s hard to keep up. I’m no CSS expert, but I know enough to be past the overconfidence cliff in the Dunning-Kruger curve and into the valley of respect and reverence. I delight in one-off goodies like “text-wrap: pretty” (which prevents an orphan word stuck on its own line from ending a paragraph) as much as broad improvements like nested declarations. In the last few years alone, we got container queries, the :has() pseudo-class, and new color spaces like oklch(). CSS supports right-to-left languages, like Hebrew and Arabic. It interpolates positioning of the pieces of a web page to create buttery animations and gradients. And now, with if() conditionals and @function in development, even the “well, technicallyyy” explanations of why CSS isn’t a legit programming language might finally be put to rest. This is not your mother’s CSS.

The fact that CSS is simple to start, yet deep to explore and master, is part of why I love it so much. It’s the closest language we have to end-user programming, the idea that software should be customizable by any user. Style sheets are like spreadsheets in that way: A novice can build something useful in an hour, and experts can build fucking Doom.