-
Notifications
You must be signed in to change notification settings - Fork 109
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
base: header-breaking-changes
Are you sure you want to change the base?
Left align header navigation items by default #1138
Conversation
792369f
to
f6c5a8c
Compare
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love it.
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? |
f6c5a8c
to
0e61a66
Compare
@anandamaryon1 Good catch! There was a simple fix to this, but the more I played around resizing the browser window, the more related issues I uncovered. So, this PR now also addresses a number of additional issues relating to navigation items, namely showing the menu button correctly (not too early nor too late), occasionally showing more navigation items on smaller screens, and separates items by using padding instead of |
This prevents items appearing next to each other in browsers that do not support column-gap on flex containers and removes the need to use gap when calculating breakpoint widths in component JS.
0e61a66
to
6f0c5bf
Compare
Description
.nhsuk-header__navigation-list--justified
which restores the previous behaviour..nhsuk-header__navigation-list--left-aligned
, as this presentation is now the default.desktop
breakpoint, which is a little closer the previous design (items look a bit too closer together above this breakpoint without making this change)column-gap
is not supported on flex containers. Items are now separated by inline padding on navigation list itemsChecklist