Skip to content

Conversation

@36degrees
Copy link
Contributor

Make use of a difference in behaviour between compilers originally identified in #5918 to ‘detect’ if the Sass is being compiled using libsass. Output a deprecation warning if it is.

@github-actions
Copy link

github-actions bot commented May 29, 2025

📋 Stats

File sizes

File Size
dist/govuk-frontend-development.min.css 128.45 KiB
dist/govuk-frontend-development.min.js 48.07 KiB
packages/govuk-frontend/dist/govuk/all.bundle.js 102.17 KiB
packages/govuk-frontend/dist/govuk/all.bundle.mjs 95.95 KiB
packages/govuk-frontend/dist/govuk/all.mjs 1.28 KiB
packages/govuk-frontend/dist/govuk/component.mjs 1.67 KiB
packages/govuk-frontend/dist/govuk/govuk-frontend.min.css 128.44 KiB
packages/govuk-frontend/dist/govuk/govuk-frontend.min.js 48.05 KiB
packages/govuk-frontend/dist/govuk/i18n.mjs 5.55 KiB
packages/govuk-frontend/dist/govuk/init.mjs 6.89 KiB

Modules

File Size (bundled) Size (minified)
all.mjs 90.17 KiB 45.66 KiB
accordion.mjs 26.58 KiB 13.41 KiB
button.mjs 9.09 KiB 3.79 KiB
character-count.mjs 25.48 KiB 11 KiB
checkboxes.mjs 7.76 KiB 3.42 KiB
error-summary.mjs 10.99 KiB 4.55 KiB
exit-this-page.mjs 20.2 KiB 10.34 KiB
file-upload.mjs 20.83 KiB 11.11 KiB
header.mjs 6.47 KiB 3.27 KiB
notification-banner.mjs 9.35 KiB 3.71 KiB
password-input.mjs 18.16 KiB 8.34 KiB
radios.mjs 6.76 KiB 2.98 KiB
service-navigation.mjs 6.38 KiB 3.25 KiB
skip-link.mjs 6.34 KiB 2.76 KiB
tabs.mjs 11.98 KiB 6.66 KiB

View stats and visualisations on the review app


Action run for d0067a4

@github-actions
Copy link

github-actions bot commented May 29, 2025

Other changes to npm package

diff --git a/packages/govuk-frontend/dist/govuk/settings/_index.scss b/packages/govuk-frontend/dist/govuk/settings/_index.scss
index e46fb4637..9cbf2779d 100644
--- a/packages/govuk-frontend/dist/govuk/settings/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/settings/_index.scss
@@ -20,4 +20,17 @@
 
 @import "https://github.com/links";
 
+// LibSass evaluates this as a single unquoted string, equivalent to
+// "true == false", whereas Dart Sass evaluates it as "true" == "false".
+// Because a string in Sass is truthy, LibSass will output the warning; Dart
+// Sass will not.
+@if #{true} == #{false} {
+  @include _warning(
+    "libsass",
+    "It looks like you may be using LibSass to compile your Sass. LibSass is " +
+      "deprecated and will not be supported by the next major version of " +
+      "GOV.UK Frontend. See https://sass-lang.com/libsass/ for more information."
+  );
+}
+
 /*# sourceMappingURL=_index.scss.map */

Action run for d0067a4

@36degrees 36degrees added this to the [NEXT] milestone Jun 4, 2025
@36degrees 36degrees changed the title [Spike] Warn if Sass is compiled using libsass Warn if Sass is compiled using libsass Jun 9, 2025
CHANGELOG.md Outdated

### New features

#### You'll see a deprecation warning if you're using LibSass
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It feels a bit weird to list this as a new feature, but I didn't want to list it as a deprecation because the deprecation happened ages ago.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we think of it as a fix, perhaps? Like, "we probably should've been warning you about this ages ago"? It does feel weird as a feature.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possibly, but we tend not to include any detail for fixes. I'm not sure it matters that much as long as we're telling people so they know when they start seeing this in their logs.

@seaemsi do you have any thoughts on the best way to communicate this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@36degrees Perhaps something like "you'll now see a deprecation warning" to highlight that there wasn't one before?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@seaemsi sounds good, thanks. Are you happy with it being listed as a 'new feature'?

@36degrees 36degrees requested a review from a team June 10, 2025 13:03
@govuk-design-system-ci govuk-design-system-ci requested a deployment to govuk-frontend-pr-5993 June 10, 2025 14:23 Abandoned
Copy link
Contributor

@domoscargin domoscargin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me once the conflict is sorted.

Make use of a difference in behaviour between compilers originally identified in #5918 to ‘detect’ if the Sass is being compiled using libsass. Output a deprecation warning if it is.
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-5993 June 12, 2025 08:08 Inactive
@36degrees 36degrees merged commit 62f6a5f into main Jun 12, 2025
49 checks passed
@36degrees 36degrees deleted the warn-libsass branch June 12, 2025 08:27
@github-project-automation github-project-automation bot moved this from Needs review 🔍 to Done 🏁 in GOV.UK Design System cycle board Jun 12, 2025
This was referenced Jun 20, 2025
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.

5 participants