I've tried to add conversion of the unit() function of Less.
What I (intended to) do is the following:
if we have a call to unit() with only one param, this must be to delete the unit, thus we call instead the Sass unit-less() function;
if we have a call to unit() with two params, (I think) we can always express it as an unit conversion in Sass (that is: 0<unit> * <value>)
There are some conversion test cases for the feature I propose. If you see any issue with the conversion, please tell me, I'm by far not a Less and Sass expert!
Hey there!
I've tried to add conversion of the unit() function of Less.
What I (intended to) do is the following:
unit()
with only one param, this must be to delete the unit, thus we call instead the Sassunit-less()
function;unit()
with two params, (I think) we can always express it as an unit conversion in Sass (that is:0<unit> * <value>
)There are some conversion test cases for the feature I propose. If you see any issue with the conversion, please tell me, I'm by far not a Less and Sass expert!
Peace