I am trying to create a mixin whereby I can change the unit from px to rem. For now, I have the following code:
@emSize : 16px;
@pxr : 1 / unit(@emSize, rem);
.padding(@padding) {padding: @padding * @pxr;}
.test {.padding(10px);}
This works fine if I only have one number in the mixin, but it does not work if I have multiple numbers. For instance, this does NOT work:
.test {.padding(10px 25px);}
What I cannot figure out is how to I could get this to work in Less.