-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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 rule is now deprecated. Migrate to @use and @forward #7031
Comments
@adidahiya I'd like to contribute a PR in the future for this. Would this be welcome, or would your team prefer this be done under the scope of something larger in the future roadmap? |
Thanks for flagging this issue. We'd be open to a contribution for this change. |
Hey @justinbhopper, we generally consider |
@ggdouglas Sure, its my pleasure! Regarding the public API: I believe these warnings would occur when importing Currently, our team is consuming Here is some extra info:
|
Sass 1.80.0 has recently deprecated the
@import
rule, causing warnings to appear during compile. Now might be a good time to migrate blueprint's scss to@use
and@forward
rules, which have been supported since v1.23.0 (2019). Support for@import
will be removed entirely in 2 years.No doubt migration is non-trivial, but I believe the changes necessary are:
@import
occurring for the purpose of importing variables, mixins, or functions, use@use
instead. Multiple files may need to be imported using@use
, since Sass only includes variables that were defined in the file directly imported. The variables/functions will be available via a namespace, although it is possible to import them as global for an even easier migration.@import
occurring for the purpose of including the contents of another file (e.g. as seen incore/src/blueprint.scss
), use@forward
instead.They provide a migration tool, although I have not tried it so I cannot speak on it.
The text was updated successfully, but these errors were encountered: