File tree Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Expand file tree Collapse file tree 3 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -49,7 +49,7 @@ less.Parser = function Parser(env) {
4949 chunks , // chunkified input
5050 current , // index of current chunk, in `input`
5151 parser ,
52- rootFilename = env . filename ;
52+ rootFilename = env && env . filename ;
5353
5454 // Top parser on an import tree must be sure there is one "env"
5555 // which will then be passed around by reference.
@@ -1278,7 +1278,7 @@ less.Parser = function Parser(env) {
12781278 $ ( this . comments ) ;
12791279 if ( ! $ ( ',' ) ) { break ; }
12801280 if ( s . condition ) {
1281- error ( "Guards are only currently allowed on a single selector. " ) ;
1281+ error ( "Guards are only currently allowed on a single selector." ) ;
12821282 }
12831283 $ ( this . comments ) ;
12841284 }
Original file line number Diff line number Diff line change @@ -30,9 +30,16 @@ tree.Extend.prototype = {
3030 } ,
3131 findSelfSelectors : function ( selectors ) {
3232 var selfElements = [ ] ,
33- i ;
33+ i ,
34+ selectorElements ;
3435
3536 for ( i = 0 ; i < selectors . length ; i ++ ) {
37+ selectorElements = selectors [ i ] . elements ;
38+ // duplicate the logic in genCSS function inside the selector node.
39+ // future TODO - move both logics into the selector joiner visitor
40+ if ( i > 0 && selectorElements . length && selectorElements [ 0 ] . combinator . value === "" ) {
41+ selectorElements [ 0 ] . combinator . value = ' ' ;
42+ }
3643 selfElements = selfElements . concat ( selectors [ i ] . elements ) ;
3744 }
3845
Original file line number Diff line number Diff line change 1- SyntaxError: Guards are only currently allowed on a single selector. in {path}multiple-guards-on-css-selectors.less on line 3, column 1:
1+ SyntaxError: Guards are only currently allowed on a single selector. in {path}multiple-guards-on-css-selectors.less on line 3, column 1:
222 .a when (@ie8 = true),
333 .b {
444 }
You can’t perform that action at this time.
0 commit comments