-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detached ruleset unlocked from namespaced mixin does not see its namespace scope #2038
Comments
I re-tested it with lessc 1.7.3. The above does not work. However if the unlocking call is moved into caller scope, the example starts to work: Works:
|
This seems like a general variable scoping bogus rather than a DR specific issue.
But this fails:
I.e. it does not work with the original example only because the namespaced mixin expansion works differently in global scope for some reason (i.e. it does not expose the namespace scope at all - I'm not sure if we have a related issue ticked already). P.S. Ah, it's #921.(Hmm, that's interesting, I knew it works this way in the global scope but I did not know it actually works the other way around anywhere else (unless covered by #1316)) |
@seven-phases-max I think that #1316 is something else - examples there do not use unlocking. I never tried this with variables as far as I remember. |
Yes. I mean that it just gets even more complicated to know what to expect when using |
If I understood you right, I would expect that:
|
I defined a detached ruleset inside a namespaced mixin. The ruleset is unable to see variables defined in its outer namespace.
Less:
actual output:
expected output:
Edit: I use node.js with lessc 1.7.0 (LESS Compiler) [JavaScript]
Edit 2: this issue is probably related to #2039
The text was updated successfully, but these errors were encountered: