marceloverdijk/lesscss-java

Mathematical operations do not work on rem units

Opened this issue · 1 comments

I'm attempting to build a mixin for outputting rem units with a pixel fallback, basically:

.margin-top(@size: 1) {
    margin-top: @size * 16px;
    margin-top: @size * 1rem;
}

However the CSS output is:

margin-top: 16px;
margin-top: 1 rem;

Note the space between 1 and rem which makes the rule invalid.

I have tried a couple of other ways of achieving the same result such as @size + rem or ~"@{size}rem" with no success.

I should note the mixin works as written using the less 1.3.3 Ruby gem.