Tuesday, 14 March 2017

SCSS Calcul error: Incompatible units: 'px' and 'px*px'

I'm using SCSS to change the style of bootstrap 4 to create my own style, but when I compile my SCSS I get this error:

{
  "status": 1,
  "file": "H:/!WEBSITE/modules/The Force - Bootstrap/content/scss/variables/variables.scss",
  "line": 330,
  "column": 34,
  "message": "Incompatible units: 'px' and 'px*px'.",
  "formatted": 
     "Error: Incompatible units: 'px' and 'px*px'. 
        on line 330 of scss/variables/variables.scss
        >> $input-height: (($font-size-base * $input-line-height) + ($input-padding-y * 2)) !default;"
}


My variables value:

$font-size-base:          14px !default;
$line-height-base:        1.846 !default;
$input-line-height:       floor(($font-size-base * $line-height-base)) !default;
$input-padding-y:         6px !default;


The line that pops the error:

$input-height: (($font-size-base * $input-line-height) + ($input-padding-y * 2)) !default;


I don't understand why it is not working and I understand even less how to fix it. I compile SCSS with node-sass and I don't think the problem comes from node-sass because it's not the first time I use it and I've been using it all day long without getting any error of that kind.



via DrunkenPoney

No comments:

Post a Comment