Skip to content
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 spectre stylesheets with @use SCSS at-rule #668

Open
mlbiche opened this issue Feb 23, 2021 · 0 comments · May be fixed by #669
Open

Import spectre stylesheets with @use SCSS at-rule #668

mlbiche opened this issue Feb 23, 2021 · 0 comments · May be fixed by #669

Comments

@mlbiche
Copy link

mlbiche commented Feb 23, 2021

Since March 2019, Dart Sass supports @use at-rule to import modules and is slowly deprecating @import. The projet is still using @import which makes it impossible to use with @use. For example :

@use "node_modules/spectre.css/src/variables";
@use "node_modules/spectre.css/src/mixins";

@use "node_modules/spectre.css/src/typography";

This code leads to an error when preprocessing it because the variable $line-height is not found in typography while it is defined in variables. The thing is @import loads all the code from the other file and this way makes variables global, while @use don't.

Updating the project to the new Dart Sass module system will allow people to load Spectre.css code using @use.

Does anyone in the community has already gave a try to such a migration on Spectre.css project ? Does anyone has already met some issues with migrating the code ? I can give it a go and propose PR if everything work fine.

Cheers 🤙

@mlbiche mlbiche linked a pull request Feb 24, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant