Fix '::' selector output, Closes #663

This commit is contained in:
Alexis Sellier
2012-02-28 16:58:44 +01:00
parent 089ca34dc1
commit 5ccf1dafec
4 changed files with 20 additions and 6 deletions

View File

@@ -916,10 +916,6 @@ less.Parser = function Parser(env) {
}
while (input.charAt(i) === ' ') { i++ }
return new(tree.Combinator)(match);
} else if (c === ':' && input.charAt(i + 1) === ':') {
i += 2;
while (input.charAt(i) === ' ') { i++ }
return new(tree.Combinator)('::');
} else if (input.charAt(i - 1) === ' ') {
return new(tree.Combinator)(" ");
} else {

View File

@@ -38,7 +38,6 @@ tree.Combinator.prototype.toCSS = function (env) {
'&' : '',
'& ' : ' ',
':' : ' :',
'::': '::',
'+' : env.compress ? '+' : ' + ',
'~' : env.compress ? '~' : ' ~ ',
'>' : env.compress ? '>' : ' > '

View File

@@ -55,3 +55,15 @@ p a span {
.qux .foo .baz .biz {
display: none;
}
.other ::fnord {
color: #ff0000;
}
.other::fnord {
color: #ff0000;
}
.other ::bnord {
color: #ff0000;
}
.other::bnord {
color: #ff0000;
}

View File

@@ -45,4 +45,11 @@ a {
display: none;
}
}
}
}
.other ::fnord { color: red }
.other::fnord { color: red }
.other {
::bnord {color: red }
&::bnord {color: red }
}