Semantify your crappy classnames

|

There’s a lot of web chatter lately related to CSS frameworks and the (un)semanticality thereof. Many people have been trying desperately to find a tangible reason to NOT use CSS frameworks - specifically Blueprint - but most either don’t know exactly what they’re trying to accomplish in the first place, citing unnamed references, claiming they want - nay - need semantics, and subsequently hate the aforementioned framework offerings. Enter Semantify.

Semantify is a tool for Blueprint designers that takes all those lame “column span-4 append-2 last” class names from your html and generates appropriate styles with single, assumed semantic class names. Simply run your source through Semantify and include the generated stylesheet and class names in your markup. Voila - semantic web with no fuss.

However, as Matthew Pennel points out in the comments, it would be great to simply detect whether or not an element with Blueprint class names has an ID, and then use ID selectors when appropriate, eliminating the need for class names altogether. Well, with any luck I’ll be coding exactly that (in Python) except I’m going to decouple my app from Blueprint specific class names and allow the user to consolidate whichever class names they want to have removed.

The benefits should be obvious - and here at Emma it can’t come soon enough. We use class names to allow for a Custom Branding option in which accounts can have complete control of our app via CSS. The only problem is, we’ve written our markup with multiple, seemingly redundant, non-semantic class names. Hell, we were young and didn’t know better. Being able to essentially collapse those names into one, potentially using only ID’s and a handful of classes would bring us closer to a full on themeing package. Less headaches for us, and more control for our users. Not a bad idea.

Keep an eye out for (insert catchy web 2.0 name here) - the new semantic sheriff in town.

Comments

Post a comment: