Skip to content

Lists + calc() breaks lookups for mixin-generated maps #3393

@zaquest

Description

@zaquest

As the title suggests using a variable containing a list and calc() breaks maps that were generated by calling a mixin and saving the result in a variable.
Below is a minimal example I was able to come up with.

@textClasses: .h1, .h2, .h3;

@alias: @textClasses; // uncommenting this breaks things
// @{textClasses} { color: white; } // or this

// calc() is involved too, commenting this make the style compile again
div { width: calc(100px * 2); }

.mk-map() {
  text: white;
  background: black;
}

@p: .mk-map();
h1 { color: @p[text]; }

Trying to compile it results in SyntaxError: Could not evaluate variable call @p.

Less version 3.9.0

Is it a bug? Or am I missing something?

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