-
Notifications
You must be signed in to change notification settings - Fork 934
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
USWDS - Header: fix mobile menu shaded display #4817
Conversation
Remove `_header.twig` settings so we can override individual templates.
Restoring to what this was previously, since escape filter now works
Remove z-index from `usa-header`. Its stacking context was **lower** than the modal. This is causing issues where the main nav, which is a child, disappears when using flex or grid on `<body>`.
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.
Looks good! Thanks for the helpful writeup.
One small thing: I found a couple uses of square brackets for placeholders in the sign in template. Everything else looks solid.
Here are the items I tested:
- Navigation is present
- Placeholder elements are displayed consistently with angle brackets
Display types on #root:
- Mobile navigation looks good with flex
- Mobile navigation looks good with grid
- Mobile navigation looks good with block
Header variants:
- Default
- Megamenu
- Extended Megamenu
- Extended
Browsers:
- Safari
- Firefox
- Chrome
|
@amyleadem thanks for the feedback! I've updated |
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.
Looks good to me!
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.
Approved but lol at 23 files changed for one line of fix! :)
Totally, that was my mistake. Will separate them out next time. |
Description
Fix mobile menu appearance for different CSS layouts. The menu now appears properly on layouts using flex or CSS grid. Closes #4409.
Additional information
Removed z-index from
usa-headerin 9c0653c. There's nopositionspecified, so it doesn't make sense to have it by default. Removing this fixes the display issue because the value was lower than the nav overlay'sz-index.Other changes
How to test
style="display: flex; flex-direction: column;todiv#rootAlso, didn't notice any side effects on the other nav variations but worth double-checking.
Browsers tested
Before you hit Submit, make sure you’ve done whichever of these applies to you:
npm testand make sure the tests for the files you have changed have passed.