
Our (CSS) Best Practices Are Killing Us - joshuacc
http://www.stubbornella.org/content/2011/04/28/our-best-practices-are-killing-us/
======
jerf
"How in the world did we even get the idea that some aspects of CSS were good
and others evil? Who decided and what data did they use to judge? Did their
goals fit our goals? There is nothing wrong with using classes. In almost
every case, classes work well and have fewer unintended consequences than
either IDs or element selectors."

What happened is that CSS was two things at the same time: It was a way of
refactoring HTML to remove massive amounts of redundant style information, and
a way of trying to bring more "semantic" meaning to HTML, for a suitably ill-
defined definition of "semantic". It was way more successful at the former
than the latter, but the latter is what made it the toast of the town and what
all the sales pitches were about. You might say the goal was "semantic", but
especially in the earlier version the _result_ was merely the ability to
refactor common styles.

As I like to say, goals aren't results. But they are very commonly confused
by, well, almost everyone. It is this confusion that got the parts of CSS that
were "merely" enabling refactoring but weren't "semantic" labeled _bad and
evil_. Adding an element like a div to refactor styles is one valid choice
that may be useful; adding a "non-semantic div" is evil from the semantic
point of view.

------
hkon
I guess it's what happens when people who are not programmers set out to jobs
involving code implicitly via WYSIWYG editors.

