Skip to content

Which version of less is this compatible with? #63

@SteveHawes

Description

@SteveHawes

I am trying to use a feature that is present in less.js V3.5.0 (Maps) but it throws an error.
Consider the following less:

@colors: {
    @red: {
        base: #f00;
    };
    @blue: {
        base: #0f0;
    }
};

@theme: blue;

.color(@color, @type) {
  
}
.test {
    color: @colors[@@theme][base];
}

This should produce the following output:

.test {
  color: #0f0;
}

Instead I get an error saying
Undefined Variable: @colors[@@theme][base]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions