0

I have three files: a.scss,b.scss,c.scss; The relationship between these three files:

c @use b as *

b @use a as *

"a.scss" have variable color

Can I reference "color" in a in c.scss

I try to reference the variable "color" in c:

background-color:$color

, but I get an error:variable undefine

1 Answer 1

0

By default, styles imported with @use in file b are only visible there; they do not carry over to file c that @uses file b. To allow them to carry over, you can use the @forward rule in file b: @forward "src/a";

Not the answer you're looking for? Browse other questions tagged or ask your own question.