user12755870
user12755870

Reputation:

Why I'm getting this error when I use a variable with SCSS?

I'm using Angular and scss, but when I try to import a variable, I get this error:

SassError: Undefined variable. border: $color-red 2px solid;

But I have defined that variable in my file:

enter image description here

And I'm using it in this way:

enter image description here

enter image description here

I have tried setting the path like this: @import url("./global/_colors.scss");, with an underscore, but it doesn't work.

What's the problem?

Upvotes: 0

Views: 669

Answers (1)

L.Blondy
L.Blondy

Reputation: 468

Try this:

@import "./global/_colors.scss";

Upvotes: 1

Related Questions