You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
calc() with escaped strings removes parenthesis #3191
In 3.0 calculations in calc() are now only done on runtime, as stated in changelog.md. Previously, since content of calc() was being calculated, things that wanted to be kept had to be espaced as such:
@oBusk Okay, got it. Not sure why Less is doing that, other than there's probably logic in there for simplifying expressions that normally works when the calculations are allowed to be evaluated, but doesn't work in this case because the expressions aren't getting evaluated.
Activity
matthew-dean commentedon Mar 21, 2018
Sorry, what is the problem with the output? The removal of the parentheses?
oBusk commentedon Mar 21, 2018
Exactly. The parentheses is removed, causing the calculation to be wrong.
Calc will be evaluated as
(A - B) + Cinstead ofA - (B + C)matthew-dean commentedon Mar 21, 2018
@oBusk Okay, got it. Not sure why Less is doing that, other than there's probably logic in there for simplifying expressions that normally works when the calculations are allowed to be evaluated, but doesn't work in this case because the expressions aren't getting evaluated.
Valid bug.
matthew-dean commentedon Jun 3, 2018
Elevating to medium just because low is like an edge case that may never happen, and this seems like it may reasonably happen more often.
Fixes less#3191
matthew-dean commentedon Jun 20, 2018
Fixed! - PR needs review - #3223