You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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]
The text was updated successfully, but these errors were encountered:
SomMeri
pushed a commit
to SomMeri/less4j
that referenced
this issue
Jul 1, 2014
Yes, this is what we actually assumed in #2064 (i.e. there it was not some kind of a scope priority issue but just "DR does not expose its variables to outer scope at all"). Hmm, I guess we can close #2064 and keep the discussion here?
I closed the other issue and I am closing this one too. I did not liked the subtle difference in behavior I through I found, but this is not subtle at all. After all, workaround is possible, although somewhat limited:
@detached-ruleset: {
.acquire() {
@color:blue; //variable will be returned
}
};
.caller {
@detached-ruleset();
.acquire();
color: @color;
}
Might make sense to re-open if someone has real use case for that.
Now I see that detached rulesets do not return variables at all. Following throws compile error:
Error:
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]
The text was updated successfully, but these errors were encountered: