+ 2

Variables in @use statements, sass

How can I use variables in @use statements in sass. I tried this $path: 'path/to/library'; @use $path + 'settings'; It does not work. I have searched their official site, I cannot find an answer.

23rd Jul 2020, 12:57 PM
Ore
Ore - avatar
2 Answers
+ 8
I think you're confusing mixing and variables //Variables $green:#33D374 .box-one{ background-color:$green; } //Mixing @mixin base-grid() { display:grid; grid-gap:21px; } .portfolio{ @include base-grid(); grid-template-columns:1fr; padding:42px; And mixins can also contain variables
30th Jul 2020, 12:42 AM
Dalia Matus
Dalia Matus - avatar
+ 1
Dalia A. I was not talking about mix-ins. I was taking about using variables values as the operand for @use keyword. FYI, @use is used to import a namespace in scss. Anyway, I have done some research and I think it is not possible so thanks for the help.
30th Jul 2020, 4:07 PM
Ore
Ore - avatar