I'm currently working on a WordPress theme and running into an issue with utilizing SASS from another file using the @use
method. For those of you who may not know, the @import
rule method will soon be deprecated which is why I am trying to implement this new approach.
Here are the contents of my files:
//_brand.scss
$base-color: #c6538c;
$border-dark: rgba($base-color, 0.88);
Now moving onto...
//footer.scsss
@use 'brand' as b;
.footer{
padding: 0px 5%;
background-color: b.$base-color;
}
However, when I try to compile, I encounter the following error message:
Compilation Error
Error: Invalid CSS after "...ground-color: b": expected expression (e.g. 1px, bold), was ".$font-size;"
on line 5 of sass/opt/lampp/.../sass/footer.scss
>> background-color: b.$base-color;
I have been utilizing the "Live Sass Compiler" extension in Visual Studio Code for compiling to CSS.