mirror of
https://github.com/less/less.js.git
synced 2026-05-01 03:00:22 -04:00
Fix dynamic mixins with nested rules
Dynamic mixins with more than one level of nesting wouldn't work. This is now fixed. Also refactored mixin.definition.eval a little.
This commit is contained in:
@@ -7,6 +7,12 @@ tree.Ruleset = function Ruleset(selectors, rules) {
|
||||
};
|
||||
tree.Ruleset.prototype = {
|
||||
eval: function () { return this },
|
||||
evalRules: function (context) {
|
||||
return new(tree.Ruleset)(this.selectors, this.rules.map(function (r) {
|
||||
if (r.evalRules) return r.evalRules(context);
|
||||
else return r.eval(context);
|
||||
}));
|
||||
},
|
||||
variables: function () {
|
||||
if (this._variables) { return this._variables }
|
||||
else {
|
||||
|
||||
Reference in New Issue
Block a user