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
False "Whitespace between a mixin name and parentheses for a mixin call" deprecation warning #4339
I'm getting a lot of mixin related errors like these:
<w> DEPRECATED WARNING: Whitespace between a mixin name and parentheses for a mixin call is deprecated in /home/egonolieux/projects/some-project/assets/less/mixins/divider.less on line 50, column 20:
<w> 50 .divider-bottom(
<w>
It seems like splitting the mixin arguments over multiple lines (for better readability) causes the issue:
The deprecation warning no longer shows up. It seems this has been introduced since #4319.
Reacted by dosubot, Georgii Dolzhykov, Sebastian Blank, Torleif Berger, Pieter Hoste, Kimmo Kurola, Salmon, JC Estibariz, mst-kialo, Kevin W. and 1 more
Hello @egonolieux! I'm Dosu, your friendly helper bot here to assist you with bugs, answer questions, and guide you toward becoming a contributor. I'm here while you wait for a human maintainer!
To resolve the deprecation warning about whitespace between a mixin name and parentheses for a mixin call in Less, ensure there is no whitespace between the mixin name and the opening parenthesis. Your initial example is actually correct and should not trigger a warning:
If you're still encountering warnings, it might be due to a bug or an issue with the specific version of Less.js you are using. The warning is intended to be triggered when there is whitespace directly between the mixin name and the parenthesis, like in .a ();, which is deprecated [1]. If the warning persists despite correct syntax, consider checking for updates or patches that might address this issue.
Either remove the whitespace after the parenthesis as well, or wait for a fix. In our case, it was only a handful of issues, so I just fixed them all and warning is gone 👍
I just tried it in the ecosystem I'm active in, which is Magento2 ecommerce platform written in php, that uses less files for its frontend, and the amount of deprecated warnings dropped from 1220 to 39 after your changes, and those 39 seem like valid warnings. (example where warning went away, and example where warning still shows up, but that seems valid)
Activity
dosubot commentedon Apr 11, 2025
Hello @egonolieux! I'm Dosu, your friendly helper bot here to assist you with bugs, answer questions, and guide you toward becoming a contributor. I'm here while you wait for a human maintainer!
To resolve the deprecation warning about whitespace between a mixin name and parentheses for a mixin call in Less, ensure there is no whitespace between the mixin name and the opening parenthesis. Your initial example is actually correct and should not trigger a warning:
If you're still encountering warnings, it might be due to a bug or an issue with the specific version of Less.js you are using. The warning is intended to be triggered when there is whitespace directly between the mixin name and the parenthesis, like in
.a ();, which is deprecated [1]. If the warning persists despite correct syntax, consider checking for updates or patches that might address this issue.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
puckowski commentedon Apr 11, 2025
Thank you for the bug report. I'll see if I can take a look this weekend.
matthew-dean commentedon Apr 12, 2025
Oh oops. Yeah this shouldn't cause the warning.
Y80 commentedon Apr 16, 2025
How to disable this warning❓❓❓
Svish commentedon Apr 22, 2025
Either remove the whitespace after the parenthesis as well, or wait for a fix. In our case, it was only a handful of issues, so I just fixed them all and warning is gone 👍
puckowski commentedon Apr 22, 2025
You can try the newer
--quietflag to suppress the deprecation warnings when compiling Less.@Y80
hostep commentedon Aug 29, 2025
Any chance we'll see a fix for this soon-ish? Many thanks!
puckowski commentedon Aug 30, 2025
I'll try to take a look at this issue this weekend.
fix(issue#4339): limit whitespace check
fix(issue#4339): correct deprecation notice
puckowski commentedon Aug 30, 2025
I think I have a fix in #4365
If anyone wants to patch their Less parser and confirm the fix corrects the behavior I would appreciate it.
hostep commentedon Aug 31, 2025
Looks good @puckowski!
I just tried it in the ecosystem I'm active in, which is Magento2 ecommerce platform written in php, that uses less files for its frontend, and the amount of deprecated warnings dropped from 1220 to 39 after your changes, and those 39 seem like valid warnings. (example where warning went away, and example where warning still shows up, but that seems valid)
Many thanks!
puckowski commentedon Sep 1, 2025
@hostep Thank you for testing!
Merge pull request #4365 from puckowski/master_fix_4339
Less 5 alpha.1: Jess-powered compiler preview (#19)
Less 5 alpha.1: Jess-powered compiler preview (#4487)