This one compiles:
.myclass {
.mymixin(2);
}
.mymixin(@parameter) {
width: ((@parameter*1)*12px);
}
This one does not:
.myclass {
.mymixin(2);
}
.mymixin(@parameter) {
width: ((@parameter-1)*12px);
}
Does anyone have a clue what’s the problem with the second one?
Less treats
@parameter-1as a variable as you can tell from the compiler error:If you insert spaces it works as expected: