I'm trying to create a mixin that'll take two parameters and output sizing in px and rem. This is the code:
.sizing (@cssProperty; @sizeValue) {
@cssProperty: ((@sizeValue * @basefont) * 1px);
@cssProperty: (@sizeValue * 1rem);
}
Usage would be like:
h2 {
.sizing(font-size; 1)
}
Which should output (depending on what basefont size is defined):
h2 {
font-size: 12px;
font-size: 1rem;
}
But simpLESS won't compile it, and says there's an error in these two lines:
.sizing (@cssProperty; @sizeValue) {
.sizing(font-size; 1);
What am I doing wrong? Is it because of the variable property names?