In more than a handful of conversations lately, it’s become quite clear that we, the web development community, are prioritizing our own convenience and our own time over that of our users. With our industry’s focus on “user-centered design”, you might find that hard to believe, but it’s true.
Here’s one example. In reaction to my post on why I think CSS variables are a bad idea, SASS core team member Chris Eppstein had this to say:
Fundamentally, I agree with his sentiment: A preprocessor should not be a requirement for authoring CSS. Thankfully, it never was; you can build amazing things using only hand-authored CSS. And if you find a preprocessor helpful to your process for one reason or another, great. But using a preprocessor never has been (nor should it ever be) a requirement.
But Chris was not railing against preprocessors. Instead, he is echoing a sentiment held by many people in the preprocessor community. He feels CSS is not as powerful as it could/should be and he hopes that one day soon preprocessors won’t need to exist because CSS will have all of the features they offer natively. Like variables.
I used to feel that way. I used to want variables… and mixins… and functions… and loops… and declaration block-level inheritance. But I’ve changed my mind.
Don’t get me wrong, I love these constructs. I use them nearly every day in the SASS I write and I am incredibly thankful for the hard work that has gone into their creation and maintenance. Chris alone has probably saved me several weeks worth of work over the last four years through his contributions to SASS and Compass. I definitely owe him a beer (or three).
Ok, so if my issue is not with the idea of programmatically generating styles, why would I not want these to be part of CSS, the lingua franca for design on the Web? Well, it’s pretty simple: Converting all of these constructs into something that is actionable by the browser takes time and processing power. Someone has to pay that cost and I wouldn’t feel right passing that cost on to my end users if there are better options.
This is a topic I bring up often in my conference talks and workshops: Every decision we make affects the user experience in some way.
When we hide an
img in the small screen version of our responsive design using
display: none, the cost to us is quite minimal. It’s just one little declaration. What’s the harm? But the cost to our end users is quite significant: Longer load times, slower performance, and (in some cases) in real dollars if they are on a metered data connection. And they don’t even get to see the image they paid for!
When I look around, I see our community spending a lot of time coming up with new tools and techniques to make our jobs easier. To ship faster. And it’s not that I’m against efficiency, but I think we need to consider the implications of our decisions. And if one of those implications is making our users suffer—or potentially suffer—in order to make our lives easier, I think we need to consider their needs above our own.
Our users should never foot the bill for our convenience. We need to put their needs above our own.
@AaronGustafson Would much rather that CSS became more functional than declarative, if only to stop having to abstract it into HTML classes.
@ben_eb That’s the tension right? But a fundamental principle of CSS (and HTML for that matter) is declarative syntax.
@ben_eb As a programmer, I like to keep things DRY and create programs to do mundane tasks, but it obscures intent and complicates things.
Who Should Pay? ow.ly/UKHT8
@AaronGustafson Again, you nailed it with “convenience”. Sacrificing user experience for developer convenience is unacceptable.
@adamspelbring And yet… shall we count the frameworks?
@AaronGustafson Haha. You can’t. Every day the count would change. Our fast food society has infiltrated our beloved craft.
@jaffathecake Yep. https://t.co/N9VuMsisI0
100% agree. Don’t inflict your pain on your users. That only ends one way.
Developer convenience versus user performance - who should pay by @AaronGustafson https://t.co/tlM97RzSWE
Our users should never foot the bill for our convenience. We need to put their needs above our’s https://t.co/sUkmRcjk3m by @AaronGustafson
“Our users should never foot the bill for our convenience.” — Aaron Gustafson https://t.co/VgyJEaSidr #debate
“Welcome to the Modern Web™!” https://t.co/MWc7wybg79