-
-
Notifications
You must be signed in to change notification settings - Fork 251
Fix navbar vertical alignment and Bootstrap semantics in Astro build #1293
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
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: benbalter <282759+benbalter@users.noreply.github.com>
|
@copilot nav links are still not aligned with brand and tagline. |
Co-authored-by: benbalter <282759+benbalter@users.noreply.github.com>
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 vertical alignment issues in the navigation bar and improves Bootstrap semantics for the Astro build. The main goal is to align nav links on the same baseline as the brand name and tagline.
Key changes:
- Replaced custom
navbar-innerdiv with Bootstrap's standardcontainer-fluidclass - Added proper Bootstrap classes (
collapse,me-auto) for semantic correctness - Removed vertical padding from
.nav-link(changed frompadding: 0.5rem 1remtopadding: 0 1rem) to fix baseline alignment
| .navbar-collapse { | ||
| display: flex; | ||
| align-items: center; | ||
| } |
Copilot
AI
Dec 10, 2025
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.
The navbar collapse functionality is broken on mobile. The CSS at line 141 sets display: flex unconditionally, which means the navigation menu will always be visible on mobile devices, defeating the purpose of the collapse/toggle functionality. The .collapse Bootstrap class expects the element to be hidden by default on mobile. You need to add a mobile-specific rule that hides the .navbar-collapse by default and only shows it when the .show class is present (e.g., .navbar-collapse:not(.show) { display: none; } within the mobile media query, or remove the unconditional display: flex from line 141).
src/components/Navigation.astro
Outdated
| list-style: none; | ||
| padding-left: 0; | ||
| margin: 0; | ||
| margin-right: auto; |
Copilot
AI
Dec 10, 2025
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.
The margin-right: auto on .navbar-nav duplicates the functionality of the me-auto Bootstrap utility class already applied to the navbar-nav element in the HTML (line 52). This redundancy can lead to confusion and maintenance issues. Consider removing this CSS rule since the Bootstrap utility class already handles this spacing.
| margin-right: auto; |
|
@copilot implement code review feedback. |
|
@copilot keep working |
Co-authored-by: benbalter <282759+benbalter@users.noreply.github.com>


Fix Navigation Bar Formatting in Astro Build ✅
Issues Fixed
Changes Made
navbar-innerdiv with Bootstrap's.container-fluidcollapseclass tonavbar-collapsefor Bootstrap compatibility.me-autoutility class onnavbar-navfor correct spacing.nav-link(changed frompadding: 0.5rem 1remtopadding: 0 1rem)display: flexfrom.navbar-collapse(now only applied at desktop breakpoint)margin-right: autofrom.navbar-nav(already handled by.me-autoclass)Technical Details
Code Review Feedback Addressed:
Mobile Collapse Issue (Fixed):
.navbar-collapsehaddisplay: flexset unconditionally, making navigation always visible on mobiledisplay: flex- now only applied via media query at desktop breakpoint (≥768px)Redundant CSS (Removed):
margin-right: autoon.navbar-navduplicated the.me-autoBootstrap utility classResult
Desktop (≥768px):

Mobile (<768px):

All navbar elements now align on the same baseline. Responsive collapse behavior working correctly on all screen sizes.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.