mirror of
https://github.com/less/less.js.git
synced 2026-04-09 03:00:20 -04:00
support shadow dom selectors. fixes #1801
This commit is contained in:
@@ -1343,9 +1343,13 @@ less.Parser = function Parser(env) {
|
||||
//
|
||||
combinator: function () {
|
||||
var c = input.charAt(i);
|
||||
|
||||
if (c === '>' || c === '+' || c === '~' || c === '|') {
|
||||
|
||||
if (c === '>' || c === '+' || c === '~' || c === '|' || c === '^') {
|
||||
i++;
|
||||
if (input.charAt(i) === '^') {
|
||||
c = '^^';
|
||||
i++;
|
||||
}
|
||||
while (isWhitespace(input, i)) { i++; }
|
||||
return new(tree.Combinator)(c);
|
||||
} else if (isWhitespace(input, i - 1)) {
|
||||
|
||||
@@ -84,7 +84,9 @@ tree.Combinator.prototype = {
|
||||
'+' : ' + ',
|
||||
'~' : ' ~ ',
|
||||
'>' : ' > ',
|
||||
'|' : '|'
|
||||
'|' : '|',
|
||||
'^' : ' ^ ',
|
||||
'^^' : ' ^^ '
|
||||
},
|
||||
_outputMapCompressed: {
|
||||
'' : '',
|
||||
@@ -93,7 +95,9 @@ tree.Combinator.prototype = {
|
||||
'+' : '+',
|
||||
'~' : '~',
|
||||
'>' : '>',
|
||||
'|' : '|'
|
||||
'|' : '|',
|
||||
'^' : '^',
|
||||
'^^' : '^^'
|
||||
},
|
||||
genCSS: function (env, output) {
|
||||
output.add((env.compress ? this._outputMapCompressed : this._outputMap)[this.value]);
|
||||
|
||||
Reference in New Issue
Block a user