mirror of
https://github.com/less/less.js.git
synced 2026-01-23 06:07:56 -05:00
Fix '::' selector output, Closes #663
This commit is contained in:
@@ -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 {
|
||||
|
||||
@@ -38,7 +38,6 @@ tree.Combinator.prototype.toCSS = function (env) {
|
||||
'&' : '',
|
||||
'& ' : ' ',
|
||||
':' : ' :',
|
||||
'::': '::',
|
||||
'+' : env.compress ? '+' : ' + ',
|
||||
'~' : env.compress ? '~' : ' ~ ',
|
||||
'>' : env.compress ? '>' : ' > '
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -45,4 +45,11 @@ a {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.other ::fnord { color: red }
|
||||
.other::fnord { color: red }
|
||||
.other {
|
||||
::bnord {color: red }
|
||||
&::bnord {color: red }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user