a few minor selector match fixes...

This commit is contained in:
seven-phases-max
2013-10-29 18:48:10 +04:00
parent 05ef5cd0ac
commit 194f2c5213
2 changed files with 5 additions and 5 deletions

View File

@@ -170,9 +170,9 @@ tree.Ruleset.prototype = {
if (rule !== self) {
for (var j = 0; j < rule.selectors.length; j++) {
if (match = selector.match(rule.selectors[j])) {
if (selector.elements.length > rule.selectors[j].elements.length) {
if (selector.elements.length > match) {
Array.prototype.push.apply(rules, rule.find(
new(tree.Selector)(selector.elements.slice(rule.selectors[j].elements.length)), self));
new(tree.Selector)(selector.elements.slice(match)), self));
} else {
rules.push(rule);
}