-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Vars storing calculations don't crunch the calculation if the var is used in calc() #3235
Comments
@calvinjuarez Okay yeah definitely a bug. I guess for whatever reason I didn't actually add this to tests and thought it was covered. Incidentally, I think this is probably a bug related to the issue I was having trying to get Or maybe that's unrelated since the vars may not be in parens? 🤔 |
Fixed! |
This is likely one of the first workarounds people will try when their calc starts working the way it's designed to (ignoring the content of
calc()
).Critically, the calculated value of
calc(100% - 10px + 30px)
(as shown in the v3.5.0-beta output) is NOT the same as the expected and intuitive calculated value ofcalc(100% - 40px)
.test.less
Less 2 Output & Expected
npm i -g less@2 && lessc --strict-math=on test.less ./test.css
(see #3221 (comment))
Less 3 Output
npm i -g less@3.5.0-beta && lessc --strict-math=on test.less ./test.css
The text was updated successfully, but these errors were encountered: