Skip to content
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

Remove redundant tag CSS from phase banner #5090

Merged
merged 2 commits into from
Jun 18, 2024
Merged

Conversation

36degrees
Copy link
Contributor

The phase banner uses the tag component, which takes care of doing this for us since 976535e (part of #3502):

// When forced colour mode is active, for example to provide high contrast,
// the background colour of the tag is the same as the rest of the page. To ensure
// that the tag is perceived as separate from any surround text, it is made bold.
//
// Transparent outlines are no longer added, as they make the Tag look indistinguishable
// from a button – but the tag is not interactive in the same way.
@media screen and (forced-colors: active) {
font-weight: bold;
}

@govuk-design-system-ci govuk-design-system-ci temporarily deployed to govuk-frontend-pr-5090 June 18, 2024 16:34 Inactive
Copy link

📋 Stats

File sizes

File Size
dist/govuk-frontend-development.min.css 113.34 KiB
dist/govuk-frontend-development.min.js 41.88 KiB
packages/govuk-frontend/dist/govuk/all.bundle.js 87.42 KiB
packages/govuk-frontend/dist/govuk/all.bundle.mjs 82.11 KiB
packages/govuk-frontend/dist/govuk/all.mjs 981 B
packages/govuk-frontend/dist/govuk/govuk-frontend-component.mjs 359 B
packages/govuk-frontend/dist/govuk/govuk-frontend.min.css 113.33 KiB
packages/govuk-frontend/dist/govuk/govuk-frontend.min.js 41.87 KiB
packages/govuk-frontend/dist/govuk/i18n.mjs 5.55 KiB
packages/govuk-frontend/dist/govuk/init.mjs 4.86 KiB

Modules

File Size (bundled) Size (minified)
all.mjs 79.24 KiB 39.84 KiB
accordion.mjs 23.5 KiB 12.39 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 3d84c82

Copy link

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 fd84364d2..ceac53d84 100644
--- a/packages/govuk-frontend/dist/govuk/govuk-frontend.min.css
+++ b/packages/govuk-frontend/dist/govuk/govuk-frontend.min.css
@@ -4833,12 +4833,6 @@ only screen and (min-resolution:2dppx) {
     }
 }
 
-@media screen and (forced-colors:active) {
-    .govuk-phase-banner__content__tag {
-        font-weight: 700
-    }
-}
-
 .govuk-phase-banner__text {
     display: table-cell;
     vertical-align: middle

Action run for 3d84c82

Copy link

Other changes to npm package

diff --git a/packages/govuk-frontend/dist/govuk/components/phase-banner/_index.scss b/packages/govuk-frontend/dist/govuk/components/phase-banner/_index.scss
index ca98c3a6c..144e01ab6 100644
--- a/packages/govuk-frontend/dist/govuk/components/phase-banner/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/phase-banner/_index.scss
@@ -25,14 +25,6 @@
         margin-right: govuk-spacing(2);
       }
     }
-
-    // When forced colour mode is active, for example to provide high contrast,
-    // the background colour of the tag is the same as the rest of the page. To ensure
-    // that the tag is perceived as separate to the rest of the text in the phase banner,
-    // it is made bold.
-    @media screen and (forced-colors: active) {
-      font-weight: bold;
-    }
   }
 
   .govuk-phase-banner__text {

Action run for 3d84c82

Copy link
Member

@romaricpascal romaricpascal left a comment

Choose a reason for hiding this comment

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

Good spot! 🦅

@36degrees 36degrees merged commit 93cdc48 into main Jun 18, 2024
50 checks passed
@36degrees 36degrees deleted the phase-banner-redundant-css branch June 18, 2024 16:48
@romaricpascal romaricpascal mentioned this pull request Jul 12, 2024
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.

3 participants