Re:Nicole Sullivan’s Object Oriented CSS
by antidaily on Saturday February 28, 2009 @12:13PM
(#498300)
Interesting stuff. I think if people just learned to use multiple classes (ie class="box large blue-bg"), they could drastically reduce the size of their css and reuse more styles.
[ Parent
| on HN ]
Re:Nicole Sullivan’s Object Oriented CSS
by collint on Saturday February 28, 2009 @01:48PM
(#498381)
Didn't we just spend a decade or so trying to get everybody to keep their styles OUT of their markup?
I'm all for reusable css components. Personally I'm using http://github.com/chriseppstein/compass/
Re:Nicole Sullivan’s Object Oriented CSS
by russell on Saturday February 28, 2009 @02:00PM
(#498394)
TP is talking about the use of classes as mixins. One class could style the container and another could style the contents. I use multiple classes to add effects like hove via JavaScript. Hover can be a single CSS description rather than dozens of alternatives such as box and boxhover.
I'm talking about NOT using presentation-specific such as "box" or "blue".
Having class names such as "two-columns blue hoverable" are slightly more convenient but strategically similar to in-line styles.
Keep that presentation/behavior shit out of my content please.
Modularity is not a difficult problem to solve. But overloading your HTML is damned near impossible to dig yourself out of.