Page MenuHomeDevCentral

@import is deprecated in Sass
Open, NormalPublic

Description

Reference: https://sass-lang.com/d/import

The @import rules need to be migrated to use the module system.

A tool is provided to perform that migration.

Example of deprecation warning when compiling the SCSS

Deprecation Warning: Sass @import rules are deprecated and will be removed in Dart Sass 3.0.0.

More info and automated migrator: https://sass-lang.com/d/import
  ╷
3 │ @import 'settings';
  │         ^^^^^^^^^^
  ╵                                                                                                                                                                                                                                             src/assets/scss/app.scss 3:9  root stylesheet

Event Timeline

dereckson triaged this task as Normal priority.Nov 17 2024, 10:41
dereckson created this task.

Note we can only fix in upsection repository issues at our repository level.

If the stacktrace goes up to node_modules/foundation-sites, the fix is to be committed upstream against foundation-sites repository directly:

node_modules/foundation-sites/scss/util/_util.scss 5:9  @import
src/assets/scss/_settings.scss 64:9                     @import
src/assets/scss/app.scss 3:9                            root stylesheet