-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Negative calculated value lose its unit #2471
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
you can see what happens when compiling the following code:
the above outputs:
The outcome of units in the above is (mathematically) as expected. In your case
Which cases? You can apply
|
If |
well, now i understand your question (sorry)
whilst
|
Oh I'm really sorry, I use less through assetic so I had no idea it had this option. Thanks for your time! |
Does it really solve your issue? i think with
outputs:
i think the above should output Taking the above into account one could expect that in your situation possible using |
I'll use strict units now so I guess my issue is fixed. |
If I write
margin: @line-height-base;
I getmargin: 1.25em;
as expected.margin: (@line-height-base*2);
get memargin: 2.5em;
too.But
get-unit(@line-height-base)
echoes an empty value and the unit is removed if the result of an operation with this value is negative. Eg.margin: (1 - @line-height-base);
will generatemargin: -0.25;
I guess it's logical the unit is lost after a division but why is it still there in some case?
Thanks.
The text was updated successfully, but these errors were encountered: