From cb6d9f05b920b2141e6c01c55934747e283720da Mon Sep 17 00:00:00 2001 From: Joshua License Date: Fri, 21 Jan 2022 22:14:29 +0000 Subject: [PATCH 1/2] Move font style to `section-button` in accordion The accordion heading text is not styled while JavaScript (JS) is disabled. `govuk-accordion__section-heading-text` is styled but that element only exists while JS is enabled. Remove font from `govuk-accordion__section-toggle` to reduce duplicate styles. --- src/govuk/components/accordion/_index.scss | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/govuk/components/accordion/_index.scss b/src/govuk/components/accordion/_index.scss index b901ae37e4..664065d53b 100644 --- a/src/govuk/components/accordion/_index.scss +++ b/src/govuk/components/accordion/_index.scss @@ -22,6 +22,7 @@ } .govuk-accordion__section-button { + @include govuk-font($size: 24, $weight: bold); @include govuk-text-colour; display: block; @@ -29,10 +30,6 @@ padding-top: govuk-spacing(3); } - .govuk-accordion__section-heading-text { - @include govuk-font($size: 24, $weight: bold); - } - // Remove the bottom margin from the last item inside the content .govuk-accordion__section-content > :last-child { margin-bottom: 0; @@ -297,7 +294,8 @@ // Add toggle link with Chevron icon on left. .govuk-accordion__section-toggle { - @include govuk-font($size: 19); + @include govuk-typography-responsive($size: 19); + @include govuk-typography-weight-regular; color: $govuk-link-colour; } From a4ec7b78b5bf9dd91e6c98d0c0733cad266e0179 Mon Sep 17 00:00:00 2001 From: Joshua License Date: Fri, 21 Jan 2022 22:55:40 +0000 Subject: [PATCH 2/2] Add CHANGELOG entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0befe82585..202344f48e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ This change was introduced in [#2491: Prevent error summary from being re-focuse - [#2491: Prevent error summary from being re-focused after it has been initially focused on page load](https://github.com/alphagov/govuk-frontend/pull/2491) - [#2494: Allow disabling autofocus on error summary](https://github.com/alphagov/govuk-frontend/pull/2494) - [#2515: Add explicit width to summary list row with no actions pseudoelement](https://github.com/alphagov/govuk-frontend/pull/2515) +- [#2514: Fix accordion heading style while JavaScript is disabled](https://github.com/alphagov/govuk-frontend/pull/2514) ## 4.0.0 (Breaking release)