0
I’m starting to work with SASS and I’m having problems with the partial file structure. By my understanding, I did something like this:
_Colors.scss
$red: red;
$blue: blue
_Buttons.scss
@import "colors";
button{
background:$red;
color:$blue;
}
_style.scss
@import "colors";
@import "buttons";
Only that using this the SASS is showing error saying that I can not use the variables already found in the _Colors file... how to solve?
I could not reproduce this error, but I think it can be solved no matter the _Colors.scss in _Buttons.scss.
– VitorLuizC
i imported _Colors.scss into _Buttons.scss but msemo so did not proceed. my solution was to restructure my application so that it would fit.
– LeandroLuk
I did exactly the same structure and did not present the errors you commented, it might be something intermittent or some bug
– VitorLuizC
It may be possible to resolve using
!default
in global variables.$red: red !default;
– VitorLuizC