Sasscss Undefined variable using RGBA

Asked

Viewed 12 times

0

When I try to use a variable from a file . scss, with one variable it works and another not:

_templateColors.scss

$blue-dark : #0277bd !important;
$gray-light : #f5f5f5 !important;
$gray-dark : rgba(51,51,51,0.08) !important;

File that uses these colors:

@import "../../../core/static/scss/_templateColors.scss";

#left_nav{
    background-color: $gray-dark;
}

When I use the variables $blue-dark and $gray-light works normally, but the $gray-dark nay.

Error:

Error: Undefined variable.
  ╷
4 │     background-color: $gray-dark;

1 answer

0


I made a copy of the templateColors file to the same folder as the other file and it worked. Apparently it must be because Sass was not "watching" (wathcing) the template directory.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.