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
Bug when using the plus symbol on calc calls inside from expressions for colors #4316
Hey @filipesabella! 👋 I'm here to help you with any bugs, questions, or contributions you have in mind. Let's squash those bugs together!
The issue you're encountering seems to be related to how Less handles parsing of calc expressions within from color functions. Specifically, it appears that Less is having trouble parsing the + operator within calc() when used in this context, resulting in a parsing error.
Currently, Less does not evaluate math expressions directly within calc() for CSS compatibility, but it does allow for the inclusion of variables and nested math operations within its expression [1]. However, it seems that the + operator is causing a parsing issue in this specific scenario.
As a workaround, you might consider restructuring your code to avoid using the + operator directly within calc() in from expressions, or explore alternative ways to achieve the desired effect without triggering the parsing error.
Activity
dosubot commentedon Feb 18, 2025
Hey @filipesabella! 👋 I'm here to help you with any bugs, questions, or contributions you have in mind. Let's squash those bugs together!
The issue you're encountering seems to be related to how Less handles parsing of
calcexpressions withinfromcolor functions. Specifically, it appears that Less is having trouble parsing the+operator withincalc()when used in this context, resulting in a parsing error.Currently, Less does not evaluate math expressions directly within
calc()for CSS compatibility, but it does allow for the inclusion of variables and nested math operations within its expression [1]. However, it seems that the+operator is causing a parsing issue in this specific scenario.As a workaround, you might consider restructuring your code to avoid using the
+operator directly withincalc()infromexpressions, or explore alternative ways to achieve the desired effect without triggering the parsing error.To continue talking to Dosu, mention @dosu.
Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Bug Report | Other
fix(issue#4316): color calc inside from expression
puckowski commentedon Mar 22, 2026
Thank you for the bug report. I believe this should be addressed via: #4434
fix(issue#4316): color calc inside from expression (#4434)
matthew-dean commentedon Jun 14, 2026
Fixed by #4434, released in v4.6.6.
Less 5 alpha.1: Jess-powered compiler preview (#4487)