Hacker News new | ask | show | jobs
by nwienert 4645 days ago
This article is a few years behind the latest best practice.

What this is is basically "Object Oriented CSS" that became popular years ago and was later refuted by many in the community for it's numerous downsides, namely in maintenance cost, code-clutter and slow performance on old browsers and mobile.

With a preprocessor like SASS you can have OO and have semantic class names. Take that margin example. You could define class names that add varying types of margins. But you don't use them in HTML. You create a semantic class for specific use cases that @extend's the margin class you need.

Now you have the best of both worlds. Less, semantic class names, with the flexibility and consistency of the OO style.