-
Notifications
You must be signed in to change notification settings - Fork 27
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
Property: injectGlobalPaths doesn't take into account @use rules #70
Comments
As a workaround I removed the use of |
Our workaround was to create a workaround-scss file that performs the calculations, assigning them to variables and importing that file in the |
Just ran in the same issue. Since we have quite a big project these workarounds are not a good option for us. Is anyone working on this? |
We had this same issue as well. Looking into @lennu reference to https://github.com/ionic-team/stencil-sass/blob/7871073e3a882af4bf9a8fc7bf4faf6092828ee4/src/util.ts#L55 Switching that line to
Worked for me. However, this makes injected global paths use a namespace, so
Ends up with a colors namespace as per docs https://sass-lang.com/documentation/at-rules/use#choosing-a-namespace Using
Removes the namespace if that's needed to make updating easier/more seamless. I'd be happy to help with this issue. Edits: formatting |
@christian-bromann I can contribute with a fix for that. I would go with the same approach as @nickjwilde mentioned by changing the line to |
Lets say I have the following setup:
This will end up with error:
@use rules must be written before any other rules.
https://sass-lang.com/documentation/at-rules/use
The code which adds the import statements, should analyze the file and add import clauses under
@use
statements instead of just adding them to beginning of the each file.https://github.com/ionic-team/stencil-sass/blob/7871073e3a882af4bf9a8fc7bf4faf6092828ee4/src/util.ts#L55
The text was updated successfully, but these errors were encountered: