Skip to content

fix: top nav height varying by route (flex shrink lock)#87

Open
jstortoise wants to merge 1 commit into
entrius:testfrom
jstortoise:fix/nav-height
Open

fix: top nav height varying by route (flex shrink lock)#87
jstortoise wants to merge 1 commit into
entrius:testfrom
jstortoise:fix/nav-height

Conversation

@jstortoise
Copy link
Copy Markdown

@jstortoise jstortoise commented May 12, 2026

Top nav: keep a fixed height across routes

The header sits as the first child in AppLayout’s column flex stack (height: 100vh, overflow: hidden) above <main> with flexGrow: 1. Flex items default to flex-shrink: 1, so when heavier routes mount, the main area can exert shrink pressure on the header and the bar’s rendered height drifts slightly by route.

Change: Treat the header as a fixed-size flex sibling, not a shrinkable one:

  • flexShrink: 0 and flexGrow: 0 so <main> cannot compress or stretch the bar.
  • minHeight / maxHeight aligned with the existing height breakpoints (xs: 52, md: 56) so the bar stays one locked size.
  • boxSizing: 'border-box' so the bottom border counts inside that height and totals stay consistent.

Active vs inactive nav links already both use a 1px bottom border (color only differs), so no link-level style changes were required.


image image

@xiao-xiao-mao xiao-xiao-mao Bot added the bug Something isn't working label May 12, 2026
@jstortoise jstortoise changed the title Top nav: keep a fixed height across routes Fix: top nav height varying by route (flex shrink lock) May 12, 2026
@jstortoise jstortoise changed the title Fix: top nav height varying by route (flex shrink lock) fix: top nav height varying by route (flex shrink lock) May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant