Skip to content

False "Whitespace between a mixin name and parentheses for a mixin call" deprecation warning #4339

Open
@egonolieux

Description

@egonolieux

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:

.divider-bottom(
  @spacing-top,
  @spacing-bottom,
  @border-width,
  @border-color
);

This is confusing because there is no whitespace between the mixin name and parentheses here. However, when rewriting it like this:

.divider-bottom(@spacing-top,
                @spacing-bottom,
                @border-width,
                @border-color
);

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions