Skip to content

@container ruleset spaces removed after container-name #4397

@cmerighi

Description

@cmerighi

To reproduce:

// less code here
@varx: foo;
@container @varx (min-width: @threshold){
   /* ... */
}

Current behavior:

/* trailing space after the variable gets removed
    => 'foo' handled as a function
    => fail */
@container foo(min-width: 1024px){
    /* ... */
}

Expected behavior:

/* space chars preserved */
@container foo (min-width: 1024px){
    /* ... */
}

Environment information:

  • less version: 4.4.1+
  • nodejs version: 24.13.0
  • operating system: Windows

Temporary workaround:

@varx: foo;
@varxs: ~"@{varx} ";
@container @varxs (min-width: @threshold){
   /* ... */
}

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