LIL DOLLY DESIGNS

Notes  ·  10 August 2021

On reading the manual

The CSS specification is a more useful read than most CSS articles.

#web#css

The CSS specification is a more useful read than most CSS articles.

This sounds obvious, written down. In practice, almost nobody does it. The pattern, when a designer or front-end developer wants to learn about a CSS feature, is to find a tutorial, copy a snippet, and tweak until it works. The official spec, which would have answered the question definitively in two paragraphs, is treated as a reference of last resort.

The spec is not the easiest reading in the world. The earlier specs were written by committee for browser implementers, and read like it. But the modern specs, particularly the CSS Working Group’s post-2015 output, are substantially more readable than they used to be. The CSS Grid spec and the Container Queries spec are both, in places, genuinely well-written.

What you get from reading the spec, that you do not get from a tutorial:

You learn the actual scope of the feature. Most tutorials show one or two patterns. The spec shows all of them, including the ones that did not make it into the tutorial because they are obscure but occasionally exactly what you need.

You learn the constraints. The spec is honest about what the feature does not do, and why. Tutorials are usually written by enthusiasts who are not interested in the limitations.

You learn the vocabulary. Most CSS arguments at work could be settled by anyone in the room having read the spec for the relevant feature, because the disagreements are almost always about terminology.

You become the person on the team who knows. There is no faster way to be useful in a CSS conversation than to be the one who can quote the spec.

A few resources that are not the spec but adjacent. MDN is the spec, restated for humans. Caniuse is the spec, with browser support. Web.dev is the spec, with examples. All three are free. All three update faster than tutorials do.

I am not anti-tutorial. Tutorials are useful for getting started. But the gap between “I copied a snippet from a tutorial” and “I understand the spec” is large, and most of the time, closing it costs nothing more than an hour and a willingness to read something dry. The willingness is the rare part.