-
Notifications
You must be signed in to change notification settings - Fork 3.4k
False "Whitespace between a mixin name and parentheses for a mixin call" deprecation warning #4339
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
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: .divider-bottom(
@spacing-top,
@spacing-bottom,
@border-width,
@border-color
); 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 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 |
Thank you for the bug report. I'll see if I can take a look this weekend. |
Oh oops. Yeah this shouldn't cause the warning. |
How to disable this warning❓❓❓ |
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 👍 |
You can try the newer |
I'm getting a lot of mixin related errors like these:
It seems like splitting the mixin arguments over multiple lines (for better readability) causes the issue:
This is confusing because there is no whitespace between the mixin name and parentheses here. However, when rewriting it like this:
Or like this:
.divider-bottom(@spacing-top, @spacing-bottom, @border-width, @border-color);
The deprecation warning no longer shows up. It seems this has been introduced since #4319.
The text was updated successfully, but these errors were encountered: