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

Header navigation margins option 2 #1033

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

frankieroberto
Copy link
Contributor

This is an alternative to #999 which achieves the same outcome (aligning the navigation items with the rest of the header) but in a different way, by removing the horizontal padding inside the links and having horizontal margin instead.

This means a slightly reduced target area for each link, but they should still be well above the minimums for usability and accessibly (so long as the link text is 4 or more characters).

It also means that the focused item is also aligned with the header.

This is similar to the approach of the GOV.UK Design System's new service navigation component, although that has a shorter focus style.

Current Proposed
before Screenshot 2024-09-27 at 09 53 03
before-focused Screenshot 2024-09-27 at 09 53 10

@paulrobertlloyd
Copy link
Contributor

I think if you were going to use this approach, you’d still want some inline padding, say 2-4px, else it looks a bit odd, perhaps broken.

@frankieroberto
Copy link
Contributor Author

@paulrobertlloyd:

I think if you were going to use this approach, you’d still want some inline padding, say 2-4px, else it looks a bit odd, perhaps broken.

Yeah, I think I agree. The GOVUK one doesn't do that, but possibly the Transport font has a tiny bit more space in the characters compared to Frutiger?

I also kept the minimum margin between the items the same as the current padding-based spacing I think (nhsuk-spacing(6)) but perhaps it could be a little bit less.

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