From 3d39b0b6cc33e874fc2fb3f0d9e61d8745fdb2eb Mon Sep 17 00:00:00 2001 From: Owen Jones Date: Tue, 24 Sep 2024 11:58:56 +0100 Subject: [PATCH] Only apply margin to details summary when open --- CHANGELOG.md | 1 + .../govuk-frontend/src/govuk/components/details/_index.scss | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a5769829af..36404a63bf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ We've made fixes to GOV.UK Frontend in the following pull requests: - [#5278: Fix service navigation mobile toggle spacing](https://github.com/alphagov/govuk-frontend/pull/5278) - [#5331: Fix Warning Text font weight when styles are reset](https://github.com/alphagov/govuk-frontend/pull/5331) +- [#5352: Only apply margin to details summary when open](https://github.com/alphagov/govuk-frontend/pull/5352) ## v5.6.0 (Feature release) diff --git a/packages/govuk-frontend/src/govuk/components/details/_index.scss b/packages/govuk-frontend/src/govuk/components/details/_index.scss index cc72b90e40..5f6f2e7ec7 100644 --- a/packages/govuk-frontend/src/govuk/components/details/_index.scss +++ b/packages/govuk-frontend/src/govuk/components/details/_index.scss @@ -10,7 +10,9 @@ .govuk-details__summary { // Make the focus outline shrink-wrap the text content of the summary display: inline-block; + } + .govuk-details[open] .govuk-details__summary { margin-bottom: govuk-spacing(1); }