Skip to content

variable override #558

@Evanion

Description

@Evanion

It seems that the current implementation doesn't support variable override across files.
If a variable is set, it's not possible to change it in a parent file.

Works:

@var1: 40px;
.class1 {
    height: @var1; }
@var1: 60px;

Doesn't work:
(file1.less):

@var1: 40px;
.class1 {
    height: @var1; }

(file2.less):

@import "file1.less";
@var1: 60px;

I have been working with the Warp 7 framework for the past year, and having this possibility, makes it possible to define a default value, and then override it. Some frameworks (like uikit) rely on this feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions