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
{{ message }}
Repository navigation
Detached ruleset unlocked from namespaced mixin does not see its namespace scope #2038
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))
Yes. I mean that it just gets even more complicated to know what to expect when using #namespace > .mixin() pattern, i.e. the result depends not only on how it was defined but also on where it is used.
(Unlocking just inherits the mixin scope itself, i.e. if a variable is not visible in the mixin itself then it can't be expanded into the caller as well (and vice-versa)).
Consider merging this to #921 (thus to #996) as it definitely looks like the same issue.
(As the error is in #namespace > .unlocker(); statement not exposing the @variable to .unlocker(), thus it's not DR specific).
Activity
SomMeri commentedon Jul 2, 2014
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:
seven-phases-max commentedon Jul 2, 2014
This seems like a general variable scoping bogus rather than a DR specific issue.
Notice this also works:
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))
SomMeri commentedon Jul 2, 2014
@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.
seven-phases-max commentedon Jul 2, 2014
Yes. I mean that it just gets even more complicated to know what to expect when using
#namespace > .mixin()pattern, i.e. the result depends not only on how it was defined but also on where it is used.(Unlocking just inherits the mixin scope itself, i.e. if a variable is not visible in the mixin itself then it can't be expanded into the caller as well (and vice-versa)).
SomMeri commentedon Jul 3, 2014
If I understood you right, I would expect that:
seven-phases-max commentedon Jan 15, 2016
Consider merging this to #921 (thus to #996) as it definitely looks like the same issue.
(As the error is in
#namespace > .unlocker();statement not exposing the@variableto.unlocker(), thus it's not DR specific).