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

Fix active hover state for navigation section #419

Merged
merged 1 commit into from
Mar 7, 2024
Merged

Conversation

aduth
Copy link
Member

@aduth aduth commented Mar 5, 2024

🛠 Summary of changes

Fixes an issue where an expanded navigation section will show incorrectly with a light background when hovered.

See: 18F/identity-dashboard#748 (comment)

The background color here is meant to apply for hover states within the mobile navigation, and should not apply for larger viewport sizes. The solution is to add a media query to prevent the color from applying beyond the mobile navigation viewport width.

📜 Testing Plan

  1. Run npm start
  2. Go to http://localhost:4000/header/
  3. Click "Section" or "Current Section" to expand navigation items
  4. Keep cursor hovered over the navigation item
  5. Observe that it shows correctly with a dark-blue background and white foreground text
  6. In the "Mobile" preview at the bottom of the page, hover over navigation items
  7. Observe that the hover background still shows as light-blue background and dark-blue foreground text

👀 Screenshots

Before After
image image

@aduth aduth requested a review from nickttng March 5, 2024 22:07
Base automatically changed from aduth-header-preview to main March 7, 2024 13:41
@aduth aduth merged commit 564dd8b into main Mar 7, 2024
4 checks passed
@aduth aduth deleted the aduth-active-hover-nav branch March 7, 2024 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants