The Way We Talk About CSS

CSS has been seen as this fragile language that we stumble around, trying things out and seeing what works. In particular for layout, rather than using the system as specified, we have so often exploited things about the language in order to achieve far more complex layouts than it was ever designed for. We had to, or resign ourselves to very simple looking web pages.

So when I see people writing and speaking about CSS pointing to some behaviour and saying, “oh this behaves in a weird way”, I want to ask them (and sometimes do) if they have looked to see why it is behaving like that. Most of the time, if you look at the spec, you find that the answer is not all that weird. In general, if all of the browsers are doing that weird thing in the same way, it has been specified to behave like that. Perhaps we should start reframing the way we talk about these things. They are not weird, we just haven’t identified the reason yet. Perhaps because we who have been doing this for such a long time, don’t always expect there to be a reason.

Rachel Andrew, one of the leading voices on CSS Grid (and CSS layout more generally, including work on various specifications) explains why front-end and CSS developers should rethink how we discuss the language.

I do not think we help our cause by talking about CSS as this whacky, quirky language. CSS is unlike anything else, because it exists to serve an environment that is unlike anything else.

2:48 pm on December 26, 2018