One thing I’ve started using a lot more of over the last year is classes. Dozens of short, tiny helper classes. Instead of applying one ID or class to an element, I’ve started using a handful of smaller ones in conjunction with each other to get the same result.

A few minutes ago—largely as a proof of concept—I wrote this HTML:

`<a href=/login/ class="btn btn-rev btn-lrg giga go brand-face">Log in</a>`

Although a very exaggerated example, it felt good.

Using lots of tiny classes like that is akin to eating at Subway; instead of ordering a sandwich as a whole you can make an almost infinite amount of combinations of sandwich by combining the smaller parts—the ingredients.

By breaking a sandwich down into smaller bits you can quickly and efficiently create a multitude of varieties of sub. This is what class based builds are like. Instead of:

`#sandwich`

we now have

`.bread.lettuce.cheese.salami.mayo`

and that is awesome!

Don’t like tomato? It’s easy to leave it out…

Class based builds are like eating at Subway (only nicer).
Shared publiclyView activity