Update govuk-design-system scss to fix sass deprecation warnings - #110
Open
rachelhsmith wants to merge 5 commits into
Open
Update govuk-design-system scss to fix sass deprecation warnings#110rachelhsmith wants to merge 5 commits into
rachelhsmith wants to merge 5 commits into
Conversation
kylebayler
requested changes
May 28, 2026
kylebayler
left a comment
Collaborator
There was a problem hiding this comment.
Hey @rachelhsmith , thanks for this!
I've had a quick look and noticed a couple of things:
- There are lots of unused govuk-frontend styles now included, things like button groups, grid, main, template, and lots more. Do these get included in the bundled tbxforms package? If not, and they're just there because copying/pasting everything from govuk-frontend is easier, then that's OK, but if they end up in the final package, they should be removed. We only want to include the styles required for tbxforms, not to run the entire govuk-frontend.
- This looks like quite a big restructure from GDS! Have any classnames changed? I'm amazed that no changes were needed to any templates.
- Are any changes needed to Wagtail Kit to support these changes? Perhaps around colours?
rachelhsmith
force-pushed
the
chore/update-legacy-sass
branch
from
June 1, 2026 10:12
d31ef4b to
2fba8d6
Compare
Contributor
Author
|
Hi @kbayliss, thanks for having a look. In answer to your questions....
|
Collaborator
|
@rachelhsmith fab, thanks! Can you please open an issue, or ideally an MR, on Kit so the required changes are documented? If you open an MR, then I'll review it and will test the changes introduced here in a project scenario (at the moment, I'm just reviewing code and relying on your testing). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR addresses 3 types of deprecation warnings for things that will be removed in Dart Sass 3.0.0
https://sass-lang.com/documentation/breaking-changes/if-function/
https://sass-lang.com/documentation/breaking-changes/import/
https://sass-lang.com/documentation/breaking-changes/legacy-js-api/
These warnings are currently causing lots of noise for projects with tbxforms installed at build time and runtime.
The contribution advice has been followed https://github.com/torchbox/tbxforms/blob/main/CONTRIBUTING.md#updating-govuk-frontend
Breaking changes will be introduced by this upgrade:
tbxforms now uses the Sass module system. The @import rule is not compatible with files that use @use
internally.
Before:
@import 'path/to/tbxforms';
After:
@use 'path/to/tbxforms';
In the @import system, variables could be set before the import. This no longer works. All configuration must
be passed via with (...) on the @use rule.
Before:
$tbxforms-font-family: 'My Font', sans-serif;
@import 'path/to/tbxforms';
After:
@use 'path/to/tbxforms' with (
$tbxforms-font-family: 'My Font', sans-serif,
);
The following variables are now derived values and cannot be set directly. They still exist for read access in
your own styles but will throw an error if passed via with (...).
To override colours, use $tbxforms-functional-colours and pass only the keys you want to change. Values must
be a Sass colour (e.g. #1d70b8) or a palette reference map (e.g. (name: 'blue', variant: 'shade-10')).