Skip to content

Mixin defintion arguments: whitespace works as delimiter #2824

@seven-phases-max

Description

@seven-phases-max

I occasionally stepped into this bogus:

.mixin(@a @b) {
    args: @a @b;  
}

x {
    .mixin(x, y);  // OK -> args: x y;
}

I.e. the supposedly invalid mixin definition .mixin(@a @b) is actually interpreted as being equal to .mixin(@a, @b) and .mixin(@a; @b).

Other curious side-effects are:

  • .m(@a @b, @c) -> .m(@a, @b, @c)
  • .m(@a @b; @c) -> .m(@b, @c)
  • .m(@a; @b @c) -> .m(@a, @b, @c)
  • .m(@a; @b, @c) -> .m(@a, @c)
  • .m(@a, @b @c) -> .m(@a, @b, @c)
  • etc.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions