From ffcc107bc6cdc6cb705dd03ee97f6ed7abb84c6f Mon Sep 17 00:00:00 2001 From: Dana Cotoran Date: Thu, 11 Feb 2021 16:58:12 +0000 Subject: [PATCH 1/2] Fix layout_header CSS issues Currently, the layout header component looks different in the context of static vs in isolation. - on the account manager, which does not use static, the layout header navigation does not align as intended with the rest of the header on tablet devices - in the context of an application that uses static, the layout header inherits some styles from static. Additionally, application CSS will conflict with the layout_header CSS resulting in spacing issues. This aims to address some of these problems by removing unnecessary classes, as well as increasing layout_header CSS specificity where this CSS might be overruled by external styles from either static or the parent application's stylesheet. --- .../components/_layout-header.scss | 26 +++++++++++++++---- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss b/app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss index 3300eb4244..4b6786ab32 100644 --- a/app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss +++ b/app/assets/stylesheets/govuk_publishing_components/components/_layout-header.scss @@ -31,7 +31,7 @@ } .gem-c-layout-header--search-left { - .gem-c-header__menu-button { + .gem-c-header__menu-button.govuk-header__menu-button { margin-top: - govuk-spacing(7); left: 0; } @@ -70,7 +70,7 @@ margin-top: 0; } - .gem-c-header__content { + .gem-c-header__content.govuk-header__content { @include govuk-grid-column(two-thirds); padding-left: govuk-spacing(6); padding-right: govuk-spacing(1); @@ -78,10 +78,16 @@ } } +.gem-c-layout-header__search.govuk-grid-column-one-third-from-desktop, +.gem-c-layout-header__logo.govuk-grid-column-one-third-from-desktop, +.gem-c-layout-header__search.govuk-grid-column-one-third, +.gem-c-layout-header__logo.govuk-grid-column-two-thirds { + padding-right: 0; + padding-left: 0; +} + .gem-c-layout-header__logo, .gem-c-layout-header__search { - padding: 0; - @include govuk-media-query($until: "tablet") { margin-bottom: govuk-spacing(3); } @@ -96,8 +102,9 @@ } } -.gem-c-header__content { +.gem-c-header__content.govuk-header__content { width: auto; + padding-left: 0; @include govuk-media-query($from: desktop) { float: right; @@ -159,3 +166,12 @@ display: block; } } + +.govuk-header__menu-button.gem-c-header__menu-button { + top: govuk-spacing(4); + right: 0; +} + +.gem-c-header__nav { + clear: both; +} From 952e3d13fbfacfbff2ab8072f59c886f62814e18 Mon Sep 17 00:00:00 2001 From: Dana Cotoran Date: Thu, 11 Feb 2021 17:36:02 +0000 Subject: [PATCH 2/2] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 47b35483ca..4575a18af0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ * Remove redundant import in accordion component ([PR #1923](https://github.com/alphagov/govuk_publishing_components/pull/1923)) * Fix toggle click tracking on step-by-steps ([PR #1925](https://github.com/alphagov/govuk_publishing_components/pull/1925)) * Accordion summary design adjustment ([PR #1926](https://github.com/alphagov/govuk_publishing_components/pull/1926)) +* Fix `layout_header` layout and spacing issues ([PR #1924](https://github.com/alphagov/govuk_publishing_components/pull/1924)) ## 24.1.0