Skip to content

Hotfix/sass modules adoption#93

Merged
NicolaSaunders merged 2 commits intomainfrom
hotfix/sass-modules-adoption
May 29, 2025
Merged

Hotfix/sass modules adoption#93
NicolaSaunders merged 2 commits intomainfrom
hotfix/sass-modules-adoption

Conversation

@NicolaSaunders
Copy link
Copy Markdown
Member

@NicolaSaunders NicolaSaunders commented May 27, 2025

  • Sass is deprecating the @import at-rule as it moves to a module system, which introduces namespacing.
  • We need to adopt @use and/or @forward instead of @import - which means things like Sass variables/functions/mixins are no longer globally available.
  • This necessitates:
    • Referencing the source files of each variable/function/mixin/@extend at the start of each Sass partial file, to be able to use them in that file
    • Each time a variable/function/mixin/@extend is used in the Sass partial file it needs to be namespaced according to the source file's parent directory (unless using a wild card pattern when referencing the source files)
  • This pull request implements the new at-rules, using a wild card pattern to avoid the requirement for a variable, function mixin or @extend to be namespaced wherever it is used within a SCSS file.

Sass module system introduces name spacing of files. The `import` at-rule has been deprecated, encouraged to replace with the `use` and `forward` at-rules.

Using a wild card approach to get around having to namespace every Sass variable/mixin/function/@extend being used.
@NicolaSaunders NicolaSaunders removed the request for review from sean-dunwoody May 27, 2025 15:45
@NicolaSaunders NicolaSaunders merged commit 9d5346b into main May 29, 2025
@NicolaSaunders NicolaSaunders deleted the hotfix/sass-modules-adoption branch May 29, 2025 09:17
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 this pull request may close these issues.

2 participants