+ 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.
2 Respostas
+ 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
+ 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.