Skip to content

Detached rulesets do not return variables #2083

@SomMeri

Description

@SomMeri

Now I see that detached rulesets do not return variables at all. Following throws compile error:

@detached-ruleset: { 
    @color:blue; //variable NOT returned
};
.caller {
    @detached-ruleset();
    color: @color; 
}

Error:

NameError: variable @color is undefined in C:\data\meri\less4java\commandLineLess\node.js-latest\test.less on line 6, column 12:
5     @detached-ruleset();
6     color: @color;
7 }

Is that how it should be? Mixins are returned as usually. If this is as expected, then the #2064 should be closed too.

Tested on lessc 1.7.3 (Less Compiler) [JavaScript]

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