Our discussion about LESS continues–this time we’re going to look into LESS mixins. With mixins we can define a group of style declarations once and then reuse them throughout the stylesheet. It helps keep our code DRY as well as producing CSS in a more efficient way, particularly when dealing with complex CSS3 syntax. LESS provides different types of mixins with their very own purpose; they can be straight-forward mixins, or they can work as a (sort of) function. Nonetheless, before we dig deep down into the subject, let’s begin with the basics of how a LESS mixin works, shall we? Tutorial thumbnail created by Paul Slowinsky from the Noun Project.
↧