CSS: Should You Use a Framework or DIY
Working with Cascading Stylesheets is no easy feat. Between browser differences, varying site design requirements and client whims, writing reusable CSS can quickly become a frustrating process. CSS frameworks are one attempt to solve these and other common problems, but they are not without their own controversies.
Purists and those hyper-concerned about semantically valid markup often decry the class names and arbitrary
div tags that frameworks seem to encourage. At the end of the day though, the truth about frameworks may be simply that your own is better than any stock version.
CSS guru Eric Meyer recently compared a number of popular CSS frameworks (including our favorite, Blueprint) during a talk at An Event Apart San Francisco, concluding that the one that’s right for you is… none of the above. Designer Jeremy Keith was there for the talk and offers a shorthand transcript, along with his own thoughts, on his blog.
While Meyer admits there are some uses, like quick prototyping or as a starting point for ideas, he feels that frameworks, much like HTML templates, aren’t a viable solution for most professional designers.
That isn’t to say you can’t take the elements of a framework you like — say a group of reset rules or font baseline rules — and hack them to suit your own work. In other words, there’s nothing wrong with reusable code, but the best reusable code is stuff you’ve written.
When I first encountered it, the Blueprint framework seemed like a brilliant idea. However, having now used it in a few projects, I often find myself fighting it as much as I’m using it. In the end I’ve found that the best solution is, as Meyer suggests, pulling out the elements I like and ditching the rest.
What sort of frameworks are you using or avoiding in your work?
[via Jeff Croft]