Building a library of mixins

As part of identifying patterns in our CSS, where we can identify code that can be turned into mixins, we might find that using a prebuilt library, such as LESS Elements or LESS Hat, doesn't always meet our requirements.

This is not necessarily an issue; it may be that the author of the library hasn't created the mixin the way we want it, as he was trying to satisfy another requirement. If existing mixins aren't available, we can always consider creating our own library of mixins as partials that can be included in future projects. We could even consider hosting mixins on GitHub (http://www.github.com), as has been done by others:

Tip

There are several popular code-sharing platforms available, which you can try—two good ...

Get Learning Less.js now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.