Skip to content
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

Left align header navigation items by default #1138

Open
wants to merge 5 commits into
base: header-breaking-changes
Choose a base branch
from

Conversation

paulrobertlloyd
Copy link
Contributor

@paulrobertlloyd paulrobertlloyd commented Feb 14, 2025

Description

  • Left align items in the header navigation
  • Provide a new modifier class, .nhsuk-header__navigation-list--justified which restores the previous behaviour.
  • Remove the previous modifier class, .nhsuk-header__navigation-list--left-aligned, as this presentation is now the default.
  • Increase the space between navigation items from 24px to 32px above the desktop breakpoint, which is a little closer the previous design (items look a bit too closer together above this breakpoint without making this change)
  • Fixes Header responsive layout breaks with JS disabled #1093, navigation items not wrapping if JavaScript is not enabled

Checklist

@paulrobertlloyd paulrobertlloyd changed the title Header navigation spacing Left align header navigation items by default Feb 14, 2025
@paulrobertlloyd
Copy link
Contributor Author

FYI, visual regression tests are failing because I only added those related to this change; the text is the search input changed in a previous commit, which is causing the failures.

Copy link
Contributor

@frankieroberto frankieroberto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love it.

@anandamaryon1
Copy link
Collaborator

Thanks @paulrobertlloyd this is great, and bonus that it fixes #1093 !

Testing it, I find that items are being hidden behind the 'More' link earlier than they should? (Pretty sure there is enough room to not hide the last item)

Maybe a corresponding change to the JS needed?

This branch:
image

Header breaking branch (without this chnage):
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants