You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Passing a large number of variables as config introduces a lot of extra code compared to the old way of @import-ing a file with all your variables before @import-ing a module with a lot of !default values you wish to override. It would be handy if I could pass a variable scope to a @use statement or have some other such shorthand way of overriding a significant number of values.
e.g.
@use 'variables' as variables;
@use 'module' with variables;
It looks like Miriam provided an extensive answer on StackOverflow. For more complex use cases, such as overriding a significant number of values, I would recommend using mixins instead of @use ... with.
@Awjin I may be missing something but the The StackOverflow answer doesn't seem to cover the idea above of pulling the variables from another file. Those answers only seem to work if the variables are defined in the same file I'm writing the @use rule in.
@davejtoews I'll work through it with you on SO. You may have to update your mental model a bit -- I also had to rethink several of my project configurations -- but I'm pretty confident the current approach provides what you'll need. I'll reply there with more detail this afternoon.
We can reopen a more specific issue here if it really is a use-case that's totally unsupported.
Passing a large number of variables as config introduces a lot of extra code compared to the old way of
@import
-ing a file with all your variables before@import
-ing a module with a lot of!default
values you wish to override. It would be handy if I could pass a variable scope to a@use
statement or have some other such shorthand way of overriding a significant number of values.e.g.
A bit more about my use case can be seen in this StackOverflow question.
The text was updated successfully, but these errors were encountered: