Skip to content

Conversation

@querkmachine
Copy link
Member

Fixes #6045.

Changes

  • Sets a text color across the entire inverse Service navigation, so that non-link content (like service name or slotted content) also has colours inverted.
  • Change other color definitions to inherit the above.

@querkmachine querkmachine requested a review from a team June 25, 2025 13:24
@querkmachine querkmachine self-assigned this Jun 25, 2025
@github-actions
Copy link

github-actions bot commented Jun 25, 2025

📋 Stats

File sizes

File Size
dist/govuk-frontend-development.min.css 128.47 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.45 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 3c38481

@github-actions
Copy link

github-actions bot commented Jun 25, 2025

Stylesheets changes to npm package

diff --git a/packages/govuk-frontend/dist/govuk/govuk-frontend.min.css b/packages/govuk-frontend/dist/govuk/govuk-frontend.min.css
index 33adab20b..8324f0916 100644
--- a/packages/govuk-frontend/dist/govuk/govuk-frontend.min.css
+++ b/packages/govuk-frontend/dist/govuk/govuk-frontend.min.css
@@ -5885,6 +5885,7 @@ screen and (forced-colors:active) {
 
 .govuk-template--rebranded .govuk-service-navigation--inverse {
     border-bottom: none;
+    color: #fff;
     background-color: #1d70b8
 }
 
@@ -5918,7 +5919,7 @@ screen and (forced-colors:active) {
 }
 
 .govuk-template--rebranded .govuk-service-navigation--inverse .govuk-service-navigation__toggle:not(:focus) {
-    color: #fff
+    color: currentcolor
 }
 
 .govuk-skip-link {

Action run for 3c38481

@github-actions
Copy link

github-actions bot commented Jun 25, 2025

Other changes to npm package

diff --git a/packages/govuk-frontend/dist/govuk/components/service-navigation/_index.scss b/packages/govuk-frontend/dist/govuk/components/service-navigation/_index.scss
index 110af2887..a487a4c85 100644
--- a/packages/govuk-frontend/dist/govuk/components/service-navigation/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/service-navigation/_index.scss
@@ -214,6 +214,11 @@
     @include _govuk-rebrand {
       // Remove bottom border to add width-container ones
       border-bottom: none;
+
+      // Set colour here so non-link text (service name, slot content) can
+      // use it too.
+      color: govuk-colour("white");
+
       background-color: $govuk-brand-colour;
 
       .govuk-width-container {
@@ -240,7 +245,7 @@
 
       // Override mobile menu toggle colour when not focused
       .govuk-service-navigation__toggle:not(:focus) {
-        color: govuk-colour("white");
+        color: currentcolor;
       }
     }
   }

Action run for 3c38481

Copy link
Contributor

@owenatgov owenatgov left a comment

Choose a reason for hiding this comment

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

:shipit:

Co-authored-by: Oliver Byford <[email protected]>
@querkmachine querkmachine force-pushed the fix-service-nav-inverse-color branch from 910421f to 3c38481 Compare July 8, 2025 09:06
@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-6047 July 8, 2025 09:06 Inactive
@querkmachine
Copy link
Member Author

There's a bunch of changes in Percy, presumably because of the changes to visual regression tests on main. I've marked the changes as approved.

@querkmachine querkmachine merged commit db19c15 into main Jul 8, 2025
49 checks passed
@querkmachine querkmachine deleted the fix-service-nav-inverse-color branch July 8, 2025 09:16
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.

Service name is black when service navigation colours are inverted and there is no service URL

5 participants