Posted by Mikey McCorry | Posted in Uncategorized | Posted on 22-08-2007
Recently there has been a bit of discussion about the ol’ separation of content and presentation after the release (and subsequent point upgrade release) of Blueprint, a most excellent CSS framework by Olav Bjørkøy (also based on the work of others) for the quick deployment of grid layouts and baseline typography. B
Among the voices heard was Jeff Croft who stood up for the framework, stating that in the real world of commercial web development, it’s less important to adhere strictly to keeping presentational class names out of the markup.
Where web standards and other best practices don’t provide great benefits, find solutions that do.
This, in turn, started a mini-barney in the comments between himself and Jeremy Keith (which has rightly been removed), highlighting that even the web-celebs are having trouble agreeing on the issue.
What I would love to see (and please enlighten me if something like this already exists, or is planned for CSS3) is something like definable style aliases. For example, instead of having the following in your markup:
<div id="header" class="column span-2 append-1">Content...</div>
… we just could use:
… and then define something like the following in your stylesheet:
alias: '.column', '.span-2', '.append-1';
This way you could keep the extraneous presentation-related classes out of the mark up and associate them to meaningful identifiers or classes in the stylesheet where they belong. From what I can gather, the problem most people have with the likes of Blueprint is not with having class names based on presentation, but the fact that they get all mixed up with the markup.
I’d love to know what you you think, especially if you know something I don’t.