Over the past several weeks, I’ve been bombarded (in e-mail, in person, and over IM) with questions about CSS frameworks. I guess I wrote the book on this topic (and contributed, if inadvertently, to one of the most notable CSS frameworks out there), so it’s completely understandable people would come to me with these questions. The question almost always sounds something like this:
“I’ve read what you’ve written about CSS frameworks, and it sounds great…but [insert name of a usually-British CSS guru here] said they were bad. What do you think about what they have to say?”
Most of the folks that seem to be very anti-CSS frameworks have the following traits in common:
- They are friends of mine. I think we’re all grown up enough to debate this without it getting personal, but I’m not going to name names here, because I just don’t think it’s necessary to make my point.
- They make their living off writing CSS. That is to say, anything that makes CSS easier for the average joe makes them somewhat less valuable — their agenda is pretty clear.
- They’re British. This is totally irrelevant and doesn’t mean anything — I just think it’s interesting. They’re not all form the UK, but it does seem like most of them are, which is just a little weird. :)
So it’s been made clear to me that these folks don’t like CSS frameworks and don’t think they should be used (except, in some cases, for rapid prototyping). What’s not clear to me is why they feel this way. So, I’m asking publicly, and hoping these folks will show up here to give me their answers: What is it about CSS frameworks that bothers you?
A few preemptive notes about what I suspect may be some of the answers:
- Some people say CSS frameworks are “un-semantic”. I’ve yet to see one that is “un-semantic”. None of them (that I’ve seen) encourage using presentational elements (like
u), or using elements for purposes they weren’t intended for (like
tablefor layout). The ones I know of encourage semantic, valid (X)HTML, so I’m not sure where this argument against them comes from.
- Some people say that CSS frameworks are “bloated.” I’m not sure at what point something becomes “bloated,” but the two most popular CSS frameworks, YUI and Blueprint, both weigh in at under 13k. Unless you’re building a mobile site or some other site where bandwidth is an extreme concern, I can’t see how 13k could possibly be a problem.
- Some people say that CSS frameworks encourage the use of lots of presentational class names. To this, I have three responses: First, CSS frameworks in general don’t encourage this. Some CSS frameworks use presentational class names for some of their components (YUI and Blueprint both use presentational names for their grids components). Many CSS frameworks don’t use any presentational class names. Second, CSS 3’s multi-column and advanced layout modules aren’t practical yet, so if you want to do complex, grid-based designs, how else are going to do them? And third, how do these presentational class names hurt the site? Do they negatively impact the user or business goals? I don’t think so. They only thing they hurt is the feelings of semantic markup nerds who go poking around the source of other people’s pages (apparently, they’re down with OPP).
Also, I’ll say this: CSS frameworks are not for everyone, or every situation. They’re especially great for those working on tight deadlines and those working in teams (teams wherein multiple people work on the same CSS — they benefit from having a consistent set of coding patterns), and also for those working on several sites of a similar nature (for example, a team working at a news company which runs 20+ newspaper sites). I’m definitely not trying to say everyone should be using CSS frameworks — but I think it’s inaccurate for these folks to be publicly saying that no one should be using CSS frameworks, too.
So, with all that having been said, I have a few questions for the peanut gallery, especially those of you who have been publicly railing against the use of CSS frameworks:
- What is it about CSS frameworks that bothers you so?
- Do you want CSS and (X)HTML to be easier for everyone, or would you rather it be a highly-skilled craft that requires the assistance of experts?
- Why is this just coming up now? Why did no one mind when Yahoo released their CSS framework, but people are bothered by Blueprint? What’s the difference?
I hope to get some great answers, as this is a topic that interests me a lot. My gut feeling is that many folks who make their living off writing semantic (X)HTML and CSS are getting scared. They’re realizing that CSS and HTML are actually pretty darn easy, especially with the aide of tools like frameworks. They’re realizing that the only hard thing about writing CSS is troubleshooting lousy browsers — and they’re realizing that lousy browsers are fewer and farther between than ever, and getting fewer every year. They’re realizing, quite frankly, that their skill set may be less valuable in the future than it has been for the past couple of years.
I’d love to be proven wrong, but until someone speaks up with some good reason why CSS frameworks shouldn’t be used, instead of simply asserting that they shouldn’t, I’m convinced these folks are just trying to drum up some false job security.
Update: I’ve posted a follow-up to this entry.