Why do people complain so much about CSS?
here's a few ideas why that might be the case
On our recent Tailwind CSS episode of JS Party, I asked our excellent panel this question:
Why do people complain so much about CSS? There’s memes and jokes about CSS… there’s all sorts of tooling for CSS… On our Frontend Feud episode when we asked, “Name something that frontend devs complain about”, CSS was the #3 answer, which was pretty high up the list.
So it seems like it is a thing that people struggle with, complain about etc. I’m just curious, why do you think that is?
This sparked an interesting conversation where each of us shared some reasons we think this might be the case. (Listen along by clicking right here.)
Feross said it has a lot to do with people not taking the time to learn it:
I think the number one reason is that people don’t bother to learn it, and they just expect to figure it out. And this is also true of JavaScript; when you hear people complaining about JavaScript, oftentimes they’re just winging it, because it looks like another language that they may know… And it’s not surprising that if you don’t learn the fundamental concepts, then you’re gonna struggle to understand the interactions between the different parts of CSS. So that’s my number one reason, I think, why people are hating on it.
Nick pointed out that there’s a paradox of choice going on with CSS:
When you’re just learning to use it, there’s no real constraints around it, and it’s more of like a design eye that you need… So you have this language, and you can make your content look like anything. Without those constraints there, I think that it’s hard to focus that. And then you don’t spend a lot of time thinking about it, and it just kind of cascades from there… (because it’s a stylesheet, get it?) 😉
Adam had a lot to say on the matter (not surprising!). He agreed with Feross on the education piece:
I think one of the things is that it’s actually really hard to get really good at CSS. I think HTML is funnily similar, too… It’s one of these things that everybody knows a bit of, but there’s actually not a huge number of people who invest that much time and effort into becoming real experts in it, the way that they do with JavaScript or other things.
I think a lot of people - they sort of start with HTML and CSS, get into JavaScript, and then they feel like they sort of graduated to JavaScript from there, and they don’t level up their CSS and HTML knowledge the same way… Because in some ways it’s not as exciting, because it feels like the potential for creating crazy stuff just isn’t really there the same way that it is with JavaScript. So I think that’s one thing.
In addition to that, Adam believes there is something bigger going on where best practices haven’t solidified over the years (until recently):
Learning the language is different from learning how to apply it in a maintainable codebase and come up with a system for writing CSS that feels like it scales with your application, and that you can go back and maintain it… And there’s been so many competing philosophies for doing that over the years that it feels like there’s no one true answer.
Related: with Tailwind, Adam believes he has landed on his unified theory of CSS. 👇
I added to the conversation that people sometimes use CSS like a whipping boy when it isn’t really to blame:
It’s easy to conflate your frustration with the technology, when your actual frustration is your lack of design skills. Now I’m just speaking personally… I can get mad at the tool that I’m using – sometimes you know what you want to design, and implementing with this tool is difficult, for whatever reason, so that you get frustrated on that side. But then on the other side of the equation you don’t know what you wanna design, or you’re struggling with the actual design decisions, and there’s nobody to take that out on but yourself, or the tool that you’re using to do the design, so it’s easy to use it as kind of a scapegoat.
So there are a few of our thoughts on the matter. What do you think?
Does CSS deserve the multitude of gripes and complaints that it receives? Or it is unjustly maligned, and why might that be the case?
Discussion
Sign in or Join to comment or subscribe