AFAIK, the result of the expression will always use the same units as its operands; adding a percentage sign to the end will give something like "50px%" at best or not work at all.
However, you can do the following (which is not very elegant, but works):
@height-in-pixels: 50; @wrap-in-pixels: 25; @bgsize: @wrap-in-pixels / @height-in-pixels * 100%; @height: @height-in-pixels + 'px'; @wrap: @wrap-in-pixels + 'px';
You can always avoid the last two lines and "-in-pixels" if you also specify units in the definition of the actual property.
ChssPly76
source share