-
Notifications
You must be signed in to change notification settings - Fork 338
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
Migrate to Sass module system (@use) #1791
Comments
It looks as though LibSass is now being deprecated: |
The beta of 2.10.0 of the US Web Design System migrates to the module system: https://designsystem.digital.gov/about/releases/#version-2100-beta-0 |
From the USWDS side, we're finding that the modules support is very patchy — perhaps too patchy to support in the near term. When we can control the compile chain, we can feel confident using modules, but we have a lot of project users that compile using, say, the built-in compiler in Jekyll, and this cannot parse modules at all. What I believe we've found — though this is not yet final — is that while we intend to move to modules when we can, we may strip this functionality from the beta and go as far as we can using the old syntax, waiting to fully move to modules if and when we find better overall support. |
Ah that's really helpful to know @thisisdano – thanks so much for taking the time to pass on your findings 🙏🏻 I think we are still a fair way of actually being able to migrate for similar reasons. |
I've been digging around the Sass repos for new information on when The comment here (December 2021) seems to imply that the deprecation did not take place due to the ecosystem not migrating to Dart Sass as quickly as anticipated, with no new date being set for it to take place. sass/sass#3223 (comment) This follow up I've asked indicates that they consider 70–80% adoption of Dart Sass to be the threshold for them to start the deprecation process. sass/sass#3276 (comment) — The current metrics don't appear to be publicly available at this time, however. |
Apparently Dart Sass adoption is currently around 66%. |
Sass' 'The Module System is Launched' blog post was amended in July 2022 with this update:
Looking at download stats we're getting very close to that 80% mark (79.5% or 79.64% if you also include downloads of sass-embedded), so we could see |
Dart Sass adoption is, as of today, at around 83.96%. It looks like the Sass team have started preparing to deprecate |
It has now been specified that Edit: It's now been stated that the official deprecation is likely to happen in the next few weeks. |
'Next few weeks' have turned into months, but the deprecation has finally happened in Sass 1.80. |
What
Update GOV.UK Frontend to use the new
@use
syntax internally to import dependencies, and to be consumed using@use
.Why
The Sass module system has been introduced, aiming to address some of the issues with the
@import
rule.The
@import
rule, and most global functions will eventually be deprecated, and then removed from Sass.Moving to
@use
will allow us to revisit and simplify the way that GOV.UK Frontend is implemented, without the limitations of@import
– for example namespacing, and the govuk-exports mixin.Depends on
Stable support for
@uses
in LibSass – which probably means a stable version with support having been out for 3-6 months.(The 'future plans' section of the module system blog post sets a hard limit of October 2021 for deprecating
@import
, which we could also do, but we'd need to have a better understanding of the impact it'll have on our users.)Further detail
We would only support compilation using Dart Sass.
We would drop support for the other compilers, which are deprecated and will not be updated to use the new module system:
The text was updated successfully, but these errors were encountered: