default function: added error when used with css-guards. updated tests.

This commit is contained in:
seven-phases-max
2013-12-22 18:54:39 +04:00
parent bdfff94920
commit bbc15a413b
5 changed files with 41 additions and 1 deletions

View File

@@ -19,12 +19,18 @@ tree.Ruleset.prototype = {
}
},
eval: function (env) {
var thisSelectors = this.selectors, selectors, selCnt, i;
var thisSelectors = this.selectors, selectors,
selCnt, i, defaultFunc = tree.defaultFunc;
if (thisSelectors && (selCnt = thisSelectors.length)) {
selectors = [];
defaultFunc.error({
type: "Syntax",
message: "it is currently only allowed in parametric mixin guards,"
});
for (i = 0; i < selCnt; i++) {
selectors.push(thisSelectors[i].eval(env));
}
defaultFunc.reset();
}
var rules = this.rules ? this.rules.slice(0) : null,