Skip to content

Mixins with parameters do not work properly #4376

@Jagget

Description

@Jagget

To reproduce:

Try this code in Playground:

@width: 125px;

.mixin(@container-name; @bp) {
  @container @container-name (width < @bp) {
    display: none;
  }
}

.foo {
  .mixin(name, @width);
  color: red;
}

Current behavior:

Does not compile with an error

variable @bp is undefined

Expected behavior:

Compiles to

.foo {
  color: red;
}
@container name (width < 125px) {
  .foo {
    display: none;
  }
}

Environment information:

  • less version: 4.4.2

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