Despite the fact that this question is quite old, I want to add some more examples of adding. Less will set your units to what works.
10px + 20px
output 30px
(20/200) * 100%
displays 10%
So, with units that you do not need to concatenate the unit measurement.
I found that adding 0 helps when you don't know what a unit value is.
.mixin(@x, @y){ @result: (@x / @y) * 100; } .my_class { .mixin(20, 100); width: @result + 0%;
The above class will have a width of 20%. If we added with px, it would be 20px.
Richard Testani
source share