mirror of
https://github.com/less/less.js.git
synced 2026-04-09 03:00:20 -04:00
support for nested rulesets inside dynamic mixins, with lexical scoping
This commit is contained in:
@@ -45,7 +45,13 @@ tree.mixin.Definition.prototype = {
|
||||
context = { frames: [this, frame].concat(env.frames) };
|
||||
|
||||
return new(tree.Ruleset)(null, this.rules.map(function (rule) {
|
||||
return new(tree.Rule)(rule.name, rule.value.eval(context));
|
||||
if (rule.rules) {
|
||||
return new(tree.Ruleset)(rule.selectors, rule.rules.map(function (r) {
|
||||
return new(tree.Rule)(r.name, r.value.eval(context));
|
||||
}));
|
||||
} else {
|
||||
return new(tree.Rule)(rule.name, rule.value.eval(context));
|
||||
}
|
||||
}));
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user