For example, I have this kind of code
In scss file at the top I have something like this:
$bgc-color: var(--color-daybreak-blue-6);
Then I use this in class, and it works perfectly.
.primary {
background-color: $bgc-color;
color: $bgc-color;
}
Now I want to change $bgc-color
value based on media queries
@media (min-width: 600px) {
$bgc-color: var(--color-red-1);
}
And this is not working, I have still main value $bgc-color: var(--color-daybreak-blue-6);
In my project I used React
and Sass
, but what may be important I use also scss.modules
, so my file is button.module.scss
Does anyone know what I do wrong? in normal css files, when I use css variables is working perfectly :(