Not sure if this is an intentional restriction but the following doesn't seem to work
.mixin() {
a {
color: red;
span { color: blue; }
}
}
.class { .mixin; }
should output
.class a {
color: red;
}
.class a span {
color: blue;
}
it only works with one level of nesting, the second level is lost when you run this code in mixin.js:
return new(tree.Ruleset)(rule.selectors, rule.rules.map(function (r) {
return new(tree.Rule)(r.name, r.value.eval(context));
}));
You could also change this area of code to allow a mixin.Call or even a mixin.Definition inside another mixin.Definition.
Not sure if this is an intentional restriction but the following doesn't seem to work
should output
it only works with one level of nesting, the second level is lost when you run this code in mixin.js:
You could also change this area of code to allow a mixin.Call or even a mixin.Definition inside another mixin.Definition.