ArtLung: Joe Crawford's personal website. 2024.

Declarative vs Imperative Programming

Kevin Marks shared this talk: Declarative Design, by Jeremy Keith which has been given in a few places around the world. It’s quite good, quite simple, but also tells a fundamental truth about the web, that is is designed to give a certain amount of control to the user. There’s video available. As I’ve been not just writing CSS lately, but also attempting to communicate about why CSS does what it does in the Front End Study Hall meetings, and why we make the choices we make. Jeremy’s video goes deeply into the why, which I greatly appreciate.

I used to say “the web is not a screenshot” — a shorthand to communicate that there’s no one correct way a website looks. People view your site on their phone and in their browser with a particular kind of screen at a particular resolution and with a particular default font size and preferences for dark or light mode and how their scrollbars look and whether they use assistive technology and how good an internet connection they have. A web page “performs” in whatever context the visitor to it is using.

In 2005 I lamented that I never wrote an essay about this:

In 2000, I started saying “the web is not a screenshot” which some people on mailing lists thought was insightful. For a long time I intended to write an insightful essay about how the web works, and what makes it great, and that we should not be so fixated on pixel-precision when it comes to the web. I regret never having put these thoughts down, because it was something that needed saying. The needs of the web its users have moved on, but I wish I had contributed that.

Let the web be the web, and let users have their say in how web pages look!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.