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
Even when the mixins are disabled, I get this Name error: variable @background is undefined, until I activate one of my themes where the variables are defined.
hrmm, yes, its undefined what should happen. I confirm that less only looks at guards on the "top" mixin - when you do #mixin.inner it looks up the mixin and evaluates it without taking into account whether it is in a guarded scope. not sure what should happen though.
It ignores also mandatory parameters e.g., following will fail:
@var: false;.mixin(@something) when (@something>2){.nested(...){nested{content:'nested'@something;}}}.mixin(){.nested(){nested{content:'alternative';}}}.mixin.nested;
SyntaxError: variable @something is undefined in ...on line 21, column 1
I would guess that inner mixin is written with assumption that guard conditions of outer mixin are satisfied and that mandatory parameters on the way up are filled. E.g. I would expect it to return following:
Activity
eikelandin commentedon Jul 12, 2013
Practical Example
Even when the mixins are disabled, I get this
Name error: variable @background is undefined, until I activate one of my themes where the variables are defined.lukeapage commentedon Jul 12, 2013
hrmm, yes, its undefined what should happen. I confirm that less only looks at guards on the "top" mixin - when you do
#mixin.innerit looks up the mixin and evaluates it without taking into account whether it is in a guarded scope. not sure what should happen though.SomMeri commentedon Jul 15, 2013
It ignores also mandatory parameters e.g., following will fail:
I would guess that inner mixin is written with assumption that guard conditions of outer mixin are satisfied and that mandatory parameters on the way up are filled. E.g. I would expect it to return following:
Added guards checking to namespaces. Issue less#1418.
SomMeri commentedon Sep 8, 2014
Closing this since it will be fixed in v2.0