Skip to content

Commit

Permalink
Adjust spacing in header to remove need for a modifier class when it …
Browse files Browse the repository at this point in the history
…contains search but no navigation
  • Loading branch information
paulrobertlloyd committed Oct 22, 2024
1 parent bc50201 commit fe4d56f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 17 deletions.
7 changes: 2 additions & 5 deletions packages/components/header/_header-transactional.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,9 @@
*/

.nhsuk-header__transactional-service-name {
margin-bottom: -(nhsuk-spacing(1));
padding-left: nhsuk-spacing(3);
padding-top: 3px;

@include mq($until: tablet) {
padding-bottom: nhsuk-spacing(3);
}
padding-top: nhsuk-spacing(1);

@include mq($until: tablet) {
padding-left: 0;
Expand Down
7 changes: 7 additions & 0 deletions packages/components/header/_header-white.scss
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@
background-color: $color_nhsuk-blue;
}

.nhsuk-navigation {
.nhsuk-header__navigation-list {
border-top: none;
}
}

.nhsuk-logo {
.nhsuk-logo__background {
fill: $color_nhsuk-blue;
Expand Down Expand Up @@ -100,6 +106,7 @@
.nhsuk-navigation-container {
background-color: $color_nhsuk-white;
}

.nhsuk-navigation {
background-color: $color_nhsuk-white;

Expand Down
22 changes: 10 additions & 12 deletions packages/components/header/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,7 @@
@include govuk-width-container;
padding: 20px 0;

@include mq($until: tablet) {
padding-bottom: 0;
}

@include mq($from: tablet) {
border-bottom: 1px solid $color_transparent_nhsuk-white-20;
display: flex;
justify-content: space-between;
}
Expand Down Expand Up @@ -113,9 +108,6 @@
.nhsuk-header__logo--only {
max-width: 100%;

@include mq($until: tablet) {
padding-bottom: nhsuk-spacing(3);
}
@include mq($from: tablet) {
.nhsuk-header__link--service {
align-items: center;
Expand Down Expand Up @@ -155,10 +147,6 @@
}
}

.nhsuk-header__search-no-nav {
padding-bottom: nhsuk-spacing(3);
}

.nhsuk-header__search-form {
height: 100%;
overflow: visible;
Expand Down Expand Up @@ -487,6 +475,10 @@
.nhsuk-navigation-container {
@include print-hide();
position: relative;

@include mq($until: tablet) {
margin-top: -20px;
}
}

// ul of hidden nav
Expand Down Expand Up @@ -537,6 +529,12 @@
}
}

.nhsuk-header__navigation-list {
@include mq($from: tablet) {
border-top: 1px solid $color_transparent_nhsuk-white-20;
}
}

.nhsuk-header__navigation-list--left-aligned {
@include mq($from: desktop) {
justify-content: initial;
Expand Down

0 comments on commit fe4d56f

Please sign in to comment.