-
Notifications
You must be signed in to change notification settings - Fork 331
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
Only apply margin to details summary when open #5352
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
govuk-design-system-ci
temporarily deployed
to
govuk-frontend-pr-5352
September 24, 2024 13:41
Inactive
This comment was marked as outdated.
This comment was marked as outdated.
📋 StatsFile sizes
Modules
View stats and visualisations on the review app Action run for 3d39b0b |
Stylesheets changes to npm packagediff --git a/packages/govuk-frontend/dist/govuk/govuk-frontend.min.css b/packages/govuk-frontend/dist/govuk/govuk-frontend.min.css
index 7fbe9acd4..0d72bd2ab 100644
--- a/packages/govuk-frontend/dist/govuk/govuk-frontend.min.css
+++ b/packages/govuk-frontend/dist/govuk/govuk-frontend.min.css
@@ -2973,7 +2973,10 @@ screen and (forced-colors:active) {
}
.govuk-details__summary {
- display: inline-block;
+ display: inline-block
+}
+
+.govuk-details[open] .govuk-details__summary {
margin-bottom: 5px
}
Action run for 3d39b0b |
Other changes to npm packagediff --git a/packages/govuk-frontend/dist/govuk/components/details/_index.scss b/packages/govuk-frontend/dist/govuk/components/details/_index.scss
index 296fcfdb0..0a500c62f 100644
--- a/packages/govuk-frontend/dist/govuk/components/details/_index.scss
+++ b/packages/govuk-frontend/dist/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);
}
Action run for 3d39b0b |
romaricpascal
approved these changes
Sep 24, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice little tidy up! 🙌🏻 Can I let you add a little CHANGELOG entry within 'Fixes' before you merge it, please? 😊
owenatgov
force-pushed
the
remove-details-summary-closed-spacing
branch
from
September 24, 2024 14:43
36355e6
to
3d39b0b
Compare
govuk-design-system-ci
temporarily deployed
to
govuk-frontend-pr-5352
September 24, 2024 14:43
Inactive
Merged
4 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What
Only applies the 5px bottom margin of the details summary when the details element is open. The details element when closed how has a bottom margin of 30px whereas before it had a calcualted bottom margin of 35px, a combination of the bttom margin of
govuk-details
andgovuk-details__summary
.Why
This is an offshoot of #5089
We're confident about removing this space as it allows us to bypass the concerns we had about managing the non-collpasing margin in Safari iOS 12 and below. Additionally, we weren't able to discern the need for the extra spacing other than speculation. This has been verified by a designer.
Visual changes
Before
After