alphagov / govuk-frontend

GOV.UK Frontend contains the code you need to start building a user interface for government platforms and services.
https://frontend.design-system.service.gov.uk/
MIT License
1.18k stars 325 forks source link

Update the icon in the warning text component to match the defined text colour and background colour, rather than always being white on black #4906

Closed owenatgov closed 7 months ago

owenatgov commented 7 months ago

What

Swaps out calls to govuk-colour in warning text to references to $govuk-text-colour and $govuk-body-background-colour.

Why

During investigations into CSS custom properties as part of https://github.com/alphagov/govuk-frontend/issues/4900, we noticed a number of places where a hypothetical change of colour scheme wouldn't properly permeate throughout the codebase. This establishes a direct relationship between the warning text component and the text colour and body background colour.

github-actions[bot] commented 7 months ago

:clipboard: Stats

File sizes

File Size
dist/govuk-frontend-development.min.css 113.25 KiB
dist/govuk-frontend-development.min.js 42.21 KiB
packages/govuk-frontend/dist/govuk/all.bundle.js 87.2 KiB
packages/govuk-frontend/dist/govuk/all.bundle.mjs 81.94 KiB
packages/govuk-frontend/dist/govuk/all.mjs 4.17 KiB
packages/govuk-frontend/dist/govuk/govuk-frontend-component.mjs 359 B
packages/govuk-frontend/dist/govuk/govuk-frontend.min.css 113.24 KiB
packages/govuk-frontend/dist/govuk/govuk-frontend.min.js 42.2 KiB
packages/govuk-frontend/dist/govuk/i18n.mjs 5.55 KiB

Modules

File Size (bundled) Size (minified)
all.mjs 77.67 KiB 40.18 KiB
accordion.mjs 22.71 KiB 12.85 KiB
button.mjs 5.98 KiB 2.69 KiB
character-count.mjs 22.4 KiB 9.92 KiB
checkboxes.mjs 5.83 KiB 2.83 KiB
error-summary.mjs 7.89 KiB 3.46 KiB
exit-this-page.mjs 17.1 KiB 9.26 KiB
header.mjs 4.46 KiB 2.6 KiB
notification-banner.mjs 6.26 KiB 2.62 KiB
password-input.mjs 15.15 KiB 7.25 KiB
radios.mjs 4.83 KiB 2.38 KiB
skip-link.mjs 4.39 KiB 2.18 KiB
tabs.mjs 10.13 KiB 6.11 KiB

View stats and visualisations on the review app


Action run for 5f9e6ca2e5c46ed83c274b9c83eccaa42264dd49

github-actions[bot] commented 7 months ago

Other changes to npm package

diff --git a/packages/govuk-frontend/dist/govuk/components/warning-text/_index.scss b/packages/govuk-frontend/dist/govuk/components/warning-text/_index.scss
index 10b0aa3d1..d221eecf6 100644
--- a/packages/govuk-frontend/dist/govuk/components/warning-text/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/warning-text/_index.scss
@@ -27,11 +27,11 @@

     // When a user customises their colours the background colour will often be removed.
     // Adding a border to the component keeps it's shape as a circle.
-    border: 3px solid govuk-colour("black");
+    border: 3px solid $govuk-text-colour;
     border-radius: 50%;

-    color: govuk-colour("white");
-    background: govuk-colour("black");
+    color: $govuk-body-background-colour;
+    background: $govuk-text-colour;

     font-size: 30px;
     line-height: 29px;

Action run for 5f9e6ca2e5c46ed83c274b9c83eccaa42264dd49