-
Notifications
You must be signed in to change notification settings - Fork 334
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
Fix service navigation mobile toggle spacing #5278
Conversation
📋 StatsFile sizes
Modules
View stats and visualisations on the review app Action run for acc9d12 |
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 bf4e7565a..1bbb7da0a 100644
--- a/packages/govuk-frontend/dist/govuk/govuk-frontend.min.css
+++ b/packages/govuk-frontend/dist/govuk/govuk-frontend.min.css
@@ -5309,7 +5309,7 @@ screen and (forced-colors:active) {
font-size: 1rem;
line-height: 1.25;
display: inline-flex;
- margin: 0 0 10px;
+ margin: 10px 0;
padding: 0;
border: 0;
color: #1a65a6;
@@ -5379,6 +5379,10 @@ screen and (forced-colors:active) {
display: none
}
+.govuk-service-navigation__service-name+.govuk-service-navigation__wrapper .govuk-service-navigation__toggle {
+ margin-top: 0
+}
+
.govuk-service-navigation__list {
font-family: GDS Transport, arial, sans-serif;
-webkit-font-smoothing: antialiased;
Action run for acc9d12 |
Other changes to npm packagediff --git a/packages/govuk-frontend/dist/govuk/components/service-navigation/_index.scss b/packages/govuk-frontend/dist/govuk/components/service-navigation/_index.scss
index 0eb5a7ed3..ec8973231 100644
--- a/packages/govuk-frontend/dist/govuk/components/service-navigation/_index.scss
+++ b/packages/govuk-frontend/dist/govuk/components/service-navigation/_index.scss
@@ -90,7 +90,7 @@
.govuk-service-navigation__toggle {
@include govuk-font($size: 19, $weight: bold);
display: inline-flex;
- margin: 0 0 govuk-spacing(2);
+ margin: govuk-spacing(2) 0;
padding: 0;
border: 0;
color: $govuk-service-navigation-link-colour;
@@ -117,6 +117,12 @@
&[hidden] {
display: none;
}
+
+ // If we have both a service name and navigation toggle, remove the
+ // margin-top so that there isn't a bunch of space between them
+ .govuk-service-navigation__service-name + .govuk-service-navigation__wrapper & {
+ margin-top: 0;
+ }
}
.govuk-service-navigation__list {
Action run for acc9d12 |
Fixes the top margin of the service navigation component's mobile toggle button being too small when not used alongside a service name.
61f8e3e
to
acc9d12
Compare
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.
Thanks. Sorry for the margin drama 🙈
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.
Looks good to me
Fix service navigation mobile toggle spacing
Fixes the top margin of the Service navigation component's mobile toggle button being missing when navigation is not alongside a service name.
This issue was introduced when making some eleventh-hour CSS changes to the component prior to release yesterday.
Changes
Screenshots
(Screenshots have the GOV.UK header added to better illustrate the spacing issue.)