Hacker News new | ask | show | jobs
by ben336 4620 days ago
I think most of the advocates for OOCSS would agree with you that preprocessors make them better. But the principles they're proposing are made better by preprocessors, they're not invalidated by them. Preprocessors let you get the benefits of reusable components without polluting the DOM with classnames. Which is better than plain OOCSS in most cases. But OOCSS allows you to have those reusable component benefits without tying you into a specific preprocessor (or any at all), and that is a benefit as well, even if you personally don't think its worth the semantic tradeoff.

Basically

OOCSS with preprocessor => reusable components + minimum DOM impact

OOCSS without preprocessors => reusable component + potentially messy DOM

CSS without OOCSS => potentially clean DOM + potentially non-reusable CSS