From 126ad348c86393cd795550d2a336d0f03417d939 Mon Sep 17 00:00:00 2001 From: Oliver Byford Date: Mon, 23 Sep 2019 09:56:17 +0100 Subject: [PATCH 1/2] Explicitly set font weight of warning-text Explicitly set the font-weight of the warning text component, and move the font styles to the __text element (the __icon element has its own size, weight and colour) Warning text is otherwise only bold because of the user-agent styling of elements. When used with GOV.UK Elements, which includes a reset stylesheet, the font-weight is reset to normal, which means the warning text is currently set in a normal weight. --- src/govuk/components/warning-text/_warning-text.scss | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/govuk/components/warning-text/_warning-text.scss b/src/govuk/components/warning-text/_warning-text.scss index 3c39032905..4fa58c3663 100644 --- a/src/govuk/components/warning-text/_warning-text.scss +++ b/src/govuk/components/warning-text/_warning-text.scss @@ -5,9 +5,6 @@ @include govuk-exports("govuk/component/warning-text") { .govuk-warning-text { - @include govuk-font($size: 19); - @include govuk-text-colour; - position: relative; @include govuk-responsive-margin(6, "bottom"); padding: govuk-spacing(2) 0; @@ -50,6 +47,8 @@ } .govuk-warning-text__text { + @include govuk-font($size: 19, $weight: bold); + @include govuk-text-colour; display: block; padding-left: 50px; } From 892fda158069c996f64dde063669ea3255ece933 Mon Sep 17 00:00:00 2001 From: Oliver Byford Date: Mon, 23 Sep 2019 11:15:47 +0100 Subject: [PATCH 2/2] Document in changelog --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b743f06436..0473951242 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,7 +15,8 @@ This will help with scenarios where some of the elements, such as navigation and ### Fixes - [Pull request #1574: Make form elements scale correctly when text resized by user](https://github.com/alphagov/govuk-frontend/pull/1574). - [Pull request #1584: Fix text resize issue with warning text icon](https://github.com/alphagov/govuk-frontend/pull/1584) -- [Pull request ##1570: Prevent inputs ending up off screen or obscured by keyboards when linking from the error summary to inputs within a large fieldset](https://github.com/alphagov/govuk-frontend/pull/1570) +- [Pull request #1570: Prevent inputs ending up off screen or obscured by keyboards when linking from the error summary to inputs within a large fieldset](https://github.com/alphagov/govuk-frontend/pull/1570) +- [Pull request #1585: Explicitly set font weight on warning-text component](https://github.com/alphagov/govuk-frontend/pull/1585) ## 3.2.0 (Feature release)