I am currently experimenting with creating a mixin that allows for switching units from px to rem. Here is the code I have so far:
@emSize : 16px;
@pxr : 1 / unit(@emSize, rem);
.padding(@padding) {padding: @padding * @pxr;}
.test {.padding(10px);}
While this setup functions correctly with single values in the mixin, it fails when dealing with multiple numbers. For example, the following does NOT work:
.test {.padding(10px 25px);}
I am struggling to find a solution to make this work in Less.