Skip to content
This repository has been archived by the owner on Jan 9, 2019. It is now read-only.

Mathematical operations do not work on rem units #33

Open
robfletcher opened this issue Jul 12, 2013 · 1 comment
Open

Mathematical operations do not work on rem units #33

robfletcher opened this issue Jul 12, 2013 · 1 comment

Comments

@robfletcher
Copy link

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.

@robfletcher
Copy link
Author

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant