-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Incorrect vh
calculations
#3269
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
There's not enough information here. What is your input |
Input:
Output:
Expected output: either css that does this computation, or an error if no such css exists. Less does the same thing when the context of the expression is the definition of a variable (e.g. Both versions 3.0.1 and 1.6.3. |
You may be confused. First, there's not any such valid CSS value as As far as elsewhere, the operation as you reported it is working as designed. How math is treated in Less could always be improved. (See: #1880) But it's currently working as expected. That is, in general, Less ignores units in expressions, with the exception being |
The following calculation:
is done incorrectly. On my laptop (Macbook with retina display; chrome), it comes out to 300px when it should be 550px.
In more detail, here's a table of the size written in less, and the actual size as reported by Chrome's inspector (which matches what I see):
(I rounded some numbers slightly.)
The text was updated successfully, but these errors were encountered: