Skip to content

BUG: Can't override variables with 'when' statement #2634

Closed
@janannedh

Description

@janannedh

It's not possible to override @variables with a 'when' statement, like this for example :

@a: false;
@b: 1px;

& when (@a = false) {
    @b: 2px;
}

But it is possible it like this:
```less
@a: false;
@b: 1px;

& when (@a = false) {
    #c {
        width: 2px;
    };
}

I tried all kinds of solutions:
http://stackoverflow.com/questions/31378687/less-when-statement-without-classname

Is this a bug?

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