Skip to content

Commit

Permalink
Use margin instead of padding to line up navigation
Browse files Browse the repository at this point in the history
Alternative option.
  • Loading branch information
frankieroberto committed Sep 27, 2024
1 parent 529a772 commit 45155f6
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions packages/components/header/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -345,12 +345,13 @@
color: $color_nhsuk-white;
display: block;
font-size: inherit;
padding: nhsuk-spacing(3) 12px;
padding: nhsuk-spacing(3) 0;
margin-right: nhsuk-spacing(6);
text-decoration: underline;
white-space: nowrap;

@include mq($from: tablet) {
padding: 12px nhsuk-spacing(3);
padding: 12px 0;
}

.nhsuk-icon__chevron-right {
Expand Down Expand Up @@ -449,17 +450,8 @@
}

.nhsuk-navigation {
/* These negative margins are the same as the padding on the navigation items,
and used to align the text of the first and last item with the rest of the header. */
margin-left: -12px;
margin-right: -12px;
display: flex;

@include mq($from: tablet) {
/* These padding is slightly more from tablet width upwards. */
margin-left: -16px;
margin-right: -16px;
}

@include mq($until: tablet) {
position: relative;
Expand Down

0 comments on commit 45155f6

Please sign in to comment.