-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@import _variables.scss to each SASS file in project #1407
Conversation
@gilhanan I'm using sass resource loader, it's great. The problem is that it does not play nicely with relative imports. About the commit
This is getting too lengthy, we need to move it to an object based loader configuration. This is a common thing, you usually divide these files to categories. |
BTW, i'm up supporting sass-resource-loader since in practice you can't work without it on a large project. Maybe we should wait a bit for them to go out of beta... Here is an example to a configuration using object
I'll also point out that you can use imports from a main variable file, they just have to be absolute. In my setup it:
But we can't put that on the starter, we'll end up confusing people. |
Not everyone is going to want to import the same |
@shlomiassaf Thanks for the feedback, I made another commit for changing the loader property to object based configuration. About the PR, the meaning of |
What kind of change does this PR introduce?
Feature:
After using SASS in project, it's seem very essential to sharing
_variables.scss
in all SASS files, instead manually import it each time, which can be over head especially when styling Angular Components thats may locating deep in the project directories so the relative path to_variables.scss
can be very long. (from experience)Other information:
Using sass-resources-loader