-
Notifications
You must be signed in to change notification settings - Fork 153
Fixed navigation hover shifting by adding default transparent bottom border #1375
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
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdds a transparent bottom border to top navigation links to prevent layout shift when hovering, ensuring consistent link height and stable page layout. State diagram for navigation link border behaviorstateDiagram-v2
title Navigation_link_border_state_diagram
[*] --> Idle
state Idle {
[*] --> Inactive
Inactive: border_bottom_2px_solid_transparent
}
Idle --> Hover
Hover: border_bottom_2px_solid_visible
Hover --> Idle
state Active {
Active: border_bottom_2px_solid_visible
}
Idle --> Active
Hover --> Active
Active --> Idle
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
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.
Pull request overview
This PR fixes a navigation layout shift bug by adding a transparent bottom border to navigation items. When users hovered over inactive menu items, a dotted border was added only on hover, causing the element height to increase and content below to shift vertically. The fix pre-allocates space for the border by setting a transparent 2px bottom border on all navigation links, matching the 2px dotted border that appears on hover.
- Added a default transparent 2px bottom border to
#header-nav-bar aelements to reserve space and prevent layout shift on hover
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…rder (fossasia#1375) Co-authored-by: Mario Behling <mb@mariobehling.de>
Screencast.from.2025-11-29.23-31-21.mp4
Fixes #1363
Summary
Fixes a layout shift in the top navigation when hovering inactive menu items.
Problem
Hover states added a dotted bottom border only on hover, which changed the element height and caused the content below to shift.
Fix
Added a default transparent bottom border to all nav items to maintain consistent element height and prevent movement.
Testing
Risk / Impact
Low — CSS-only change, isolated to header nav.
Summary by Sourcery
Prevent layout shift in the top navigation by standardizing nav item height with a default transparent bottom border.
Bug Fixes:
Enhancements: