In this fantastic video from the Webstock ’13 conference, Mike Monteiro shows that designers need to take responsibility for their actions. There are many things I touched on with my article Be Proud to be a Web Developer from almost a year ago, and it’s worth watching. From the description:
You are directly responsible for what you put into the world. Yet every day designers all over the world work on projects without giving any thought or consideration to the impact that work has on the world around them. This needs to change.
[… M]ethodologies [like OOCSS and BEM] attempt to apply the principles of Object-Oriented Programming to CSS. Notwithstanding the conceptual incompatibilities between a declarative style language and object-oriented software design principles, these methodologies introduce subtle problems which may not be immediately obvious to less-experienced developers. Most disconcertingly, these methodologies have seen widespread adoption thanks to prominent bloggers evangelising their usage as ‘best practice’.
While OOCSS classes may be understood by programmers and HTML novices, they put the design into HTML, it is the <font>-Element all over again. Little gain for complex HTML. True object oriented CSS has the objects in the CSS through SASS, rather than in HTML.
I don’t say “Don’t use classes!” but try to describe the content. A table with the class products can easily be made striped and narrow in SCSS:
Don’t want the product tables striped: Change one line in your SCSS. With OOCSS you’d have to go through every HTML template and remove the class “table-striped”. If narrow tables aren’t in the style guide after a redesign, remove one line (inside %table-narrow) and boom, all your tables aren’t narrow anymore. Same if the narrow style changes. It’s one change in one file (probably an included _table-styles.scss) and not searching through many template and HTML snippet files to change it.