I've got a mixin that accepts two parameters:
.build-logo(ab, 200px);
The first is an acronym string for one of our products, and the second is square width/height of the desired logo. What I need is a set of guarded mixins that test against the value of the first parameter - but here's where my knowledge of LESS falls short.
I think it needs to be something like this, but I can't get the syntax down:
.set-logo-colors() when (@acronym = 'ab') {
@first-color: red;
@second-color: green;
@third-color: blue;
}
Then the 3 color variables declared above need to be available in the previously mentioned .build-logo() mixin.
Any help, tips, or advice is welcome. Thank you!