Hacker News new | ask | show | jobs
by Touche 4498 days ago
Nicer looking div soup is still div soup. <div class="container"> != semantic.
1 comments

no, but <section> or <div class="products"> are semantic, and there's no reason you couldn't use those instead of <div class="container"> by using the features of LESS or SASS.
In my experience, really trying to be semantic ends up requiring gargantuan leaps of creativity trying to come up with semantic meaning for elements that are there purely for presentational reasons (wrapper classes, clearfixes, etc.)
It is certainly hard, and impossible in some cases. But not as many as you would think. Wrappers can be a problem (although not as much as they used to be). Clearfix is not a problem at all, as it does not require an element only a css mixin[1]

Still, it's very possible to be almost entirely semantic with a few minor exceptions using a css preprocessor.

[1] http://compass-style.org/reference/compass/utilities/general...

That still wouldn't be semantic. Their only reason for existing is for layout. If html/css were semantic you could write all of your html first without thinking about style or layout and then go do the css after, but that's simply not possible today.
I think you are using a different definition of "Semantic" - please provide a snippet of html you feel is semantic and I'll show how this approach can be used with it.