-
Notifications
You must be signed in to change notification settings - Fork 1.1k
USWDS - Header: Alignment fixes #5649
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
Conversation
USWDS - Nav: Fix padding in nav submenus
USWDS - Header: Fix alignment in megamenu links
…uswds into header-nav-link-alignment
@mejiaj and @mahoneycm Here are a couple of things to consider in your review.
|
Right alignment
Makes sense. I tried to keep the original PR as simple as possible to avoid regressions and to speed up review/testing. Thanks for making this fix. Narrow links in Megamenu
How much narrower? Is this a big impact? Otherwise makes sense to continue. |
@mejiaj The link elements are now about 16px narrower than before. I included some screenshots in the description to show the change. It should be easiest to see in the screenshot for Header component - megamenu. I believe this is happening because the updated link padding is being universally applied to all variants. We could either narrow how that padding is being applied or add an override to the megamenu links. I'd expect it to be a quick one-line fix to revert the megamenu link styles. My preference to make the change to preserve the link width in megamenu variants to match the narrower padding in |
@mejiaj @mahoneycm I added a padding override for megamenu submenu links in 7222ba5 and I updated the related screenshots in the description. Let me know what you think! |
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.
Lgtm! Thanks Amy!
- Standard dropdown links properly aligned to their parent dropdown text
- Megamenu links do not surpass search bar
- Megamenu maintains expected line breaks
- Mobile presentation unaffected
- No unintentional visual regressions
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.
Thanks for the changes.
I tested mobile and desktop, all variants. Both left/right alignment looks good.
Overrides USWDS extended header submenu. This is fixed in uswds/uswds#5649 and will be released in v3.7.1. In the meantime, we'll keep this override.
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.
Nice
Summary
Updated the padding on
.usa-nav__submenu
elements so that they align with other header elements.Breaking change
This is not a breaking change.
However, we recommend that users confirm that the header elements in their project align as expected.
Related issue
Closes #5417
Closes #5604
Related pull requests
This PR is a combination of PRs #5418 and #5630.
Changelog PR
Preview link
Problem statement
Header navigation links do not align with other header elements. Standard variants align too far to the left and megamenu variants align too far to the right.
From PR #5418:
Develop - default
Develop - extended
Develop - megamenu
Develop - extended megamenu
Solution
Header component - default
Header component - extended
Header component - megamenu
Header component - extended megamenu
Testing and review