scss-parser icon indicating copy to clipboard operation
scss-parser copied to clipboard

Fails when space between variable name and ':'

Open bencergazda opened this issue 7 years ago • 0 comments

modularscale-sass (and also ceaser-easing), one of the dependencies of my project defines variables like this:

// Ratios
$double-octave    : 4                 ;
$pi               : 3.14159265359     ;
$major-twelfth    : 3                 ;
$major-eleventh   : 2.666666667       ;
$major-tenth      : 2.5               ;
$octave           : 2                 ;
$major-seventh    : 1.875             ;
$minor-seventh    : 1.777777778       ;
$major-sixth      : 1.666666667       ;
$phi              : 1.618034          ;
$golden           : $phi              ;
$minor-sixth      : 1.6               ;
$fifth            : 1.5               ;
$augmented-fourth : 1.41421           ;
$fourth           : 1.333333333       ;
$major-third      : 1.25              ;
$minor-third      : 1.2               ;
$major-second     : 1.125             ;
$minor-second     : 1.066666667       ;

// Base config
$ms-base          : 1em       !default;
$ms-ratio         : $fifth    !default;
$modularscale     : ()        !default;

scss-parser fails when gets a variable definition block where there is space between the variable name and the colon. If I manually remove the spaces from there (as I would do that normally like $double-octave: 4) , the parser gets executed without any problem. It looks like space before the semicolon doesn't cause failure like this.

bencergazda avatar Sep 18 '17 09:09 bencergazda