Skip to content

Commit

Permalink
Merge pull request #954 from nhsuk/TM-3235-ensure-header-alignment
Browse files Browse the repository at this point in the history
Ensure that headers are aligned to expected standards
  • Loading branch information
roshaanbajwa authored Jun 6, 2024
2 parents e2425cf + eb1264a commit d06848f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions packages/components/header/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -530,3 +530,9 @@
display: none;
}
}

.nhsuk-header__navigation-list--left-aligned {
@include mq($from: desktop) {
justify-content: initial;
}
}
4 changes: 2 additions & 2 deletions packages/components/header/template.njk
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
</div>{# close nhsuk-header__container #}
<div class="nhsuk-navigation-container">
<nav class="nhsuk-navigation" id="header-navigation" role="navigation" aria-label="Primary navigation">
<ul class="nhsuk-header__navigation-list">
<ul class="nhsuk-header__navigation-list {%- if params.primaryLinks.length < 4 %} nhsuk-header__navigation-list--left-aligned{% endif %}">
{%- for item in params.primaryLinks %}
<li class="nhsuk-header__navigation-item">
<a class="nhsuk-header__navigation-link" href="{{item.url}}">
Expand Down Expand Up @@ -136,7 +136,7 @@

<div class="nhsuk-navigation-container">
<nav class="nhsuk-navigation" id="header-navigation" role="navigation" aria-label="Primary navigation">
<ul class="nhsuk-header__navigation-list">
<ul class="nhsuk-header__navigation-list {%- if params.primaryLinks.length < 4 %} nhsuk-header__navigation-list--left-aligned{% endif %}">
{%- for item in params.primaryLinks %}
<li class="nhsuk-header__navigation-item">
<a class="nhsuk-header__navigation-link" href="{{item.url}}">
Expand Down

0 comments on commit d06848f

Please sign in to comment.