-
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
nested mixins ignore guards #1418
Comments
Practical Example
Even when the mixins are disabled, I get this |
hrmm, yes, its undefined what should happen. I confirm that less only looks at guards on the "top" mixin - when you do |
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;
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: nested {
content: 'alternative';
} |
Closing this since it will be fixed in v2.0 |
Is this a wanted behavior? I've expected to give no output at all.
Code
Output
The text was updated successfully, but these errors were encountered: