Friday, 27 September, 2019 UTC


Summary

CSS is the design language of the web — one of three core web languages — but it also seems to be the most contentious and often perplexing. It’s too easy and too hard, too fragile and too resilient. Love it or hate it, CSS is weird: not quite markup, not quite programming in the common (imperative) sense, and nothing like the design programs we use for print. How did we get here?
I’ve seen some people claim that “CSS is for documents” — as though HTML and JavaScript weren’t also originally for documents. The entire web was for documents, but that hasn’t stopped us from pushing the medium to new extremes. This is a young platform, and all the core languages are growing fast, with CSS advancing leaps and bounds over the last few years.
But there is a real problem: the web is fundamentally device-agnostic, and therefor display-agnostic. The original website from CERN states the problem clearly:
This implies no device-specific markup, or anything which requires control over fonts or colors.
Here we are, putting fonts and colors on the web. But it’s worth taking a step back and asking: what does it even mean to design for an unknown and infinite canvas? This problem isn’t new, it’s not going away, and there are no simple answers – but if we’re going to talk about it, we have to understand the fundamental audacity of the task.
Design on the web will always be weird – but CSS is a living document, and we have the power to keep making it better.
The post Why is CSS so Weird? appeared first on Mozilla Hacks - the Web developer blog.