mirror of
https://github.com/less/less.js.git
synced 2026-04-09 03:00:20 -04:00
fix spacing issue with extends and fix tests
This commit is contained in:
@@ -49,7 +49,7 @@ less.Parser = function Parser(env) {
|
||||
chunks, // chunkified input
|
||||
current, // index of current chunk, in `input`
|
||||
parser,
|
||||
rootFilename = env.filename;
|
||||
rootFilename = env && env.filename;
|
||||
|
||||
// Top parser on an import tree must be sure there is one "env"
|
||||
// which will then be passed around by reference.
|
||||
@@ -1278,7 +1278,7 @@ less.Parser = function Parser(env) {
|
||||
$(this.comments);
|
||||
if (! $(',')) { break; }
|
||||
if (s.condition) {
|
||||
error("Guards are only currently allowed on a single selector. ");
|
||||
error("Guards are only currently allowed on a single selector.");
|
||||
}
|
||||
$(this.comments);
|
||||
}
|
||||
|
||||
@@ -30,9 +30,16 @@ tree.Extend.prototype = {
|
||||
},
|
||||
findSelfSelectors: function (selectors) {
|
||||
var selfElements = [],
|
||||
i;
|
||||
i,
|
||||
selectorElements;
|
||||
|
||||
for(i = 0; i < selectors.length; i++) {
|
||||
selectorElements = selectors[i].elements;
|
||||
// duplicate the logic in genCSS function inside the selector node.
|
||||
// future TODO - move both logics into the selector joiner visitor
|
||||
if (i > 0 && selectorElements.length && selectorElements[0].combinator.value === "") {
|
||||
selectorElements[0].combinator.value = ' ';
|
||||
}
|
||||
selfElements = selfElements.concat(selectors[i].elements);
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
SyntaxError: Guards are only currently allowed on a single selector. in {path}multiple-guards-on-css-selectors.less on line 3, column 1:
|
||||
SyntaxError: Guards are only currently allowed on a single selector. in {path}multiple-guards-on-css-selectors.less on line 3, column 1:
|
||||
2 .a when (@ie8 = true),
|
||||
3 .b {
|
||||
4 }
|
||||
|
||||
Reference in New Issue
Block a user