-
-
Notifications
You must be signed in to change notification settings - Fork 65
Description
Problem
The homepage hero/nav layout causes overlap when the nav exceeds its expected height.
Current pattern in UniversalNavbar.svelte:
nav.move-up {
margin-top: min(-100vh, calc(-1 * var(--hero-min-height)));
height: 0;
}This pulls the nav up over the hero with negative margin, then uses height: 0 to prevent it affecting layout below.
The assumption that was never true
The pattern assumes fixed nav height, but the nav height was variable from the start:
-
Logo positioning (introduced in same commit): The logo can be on the same row as links OR wrap to its own row, depending on viewport width. Complex
--check-desktop/--check-mobilelogic detects this. Nav height: 1 or 2 rows. -
flex-wrap on nav-links: Links can wrap at narrow viewports.
-
Campaign nav (current branch): Adds an explicit second row of links.
The logo wrapping was already the elephant in the room. Campaign nav just makes the problem more visible.
History
The Nov 2024 layout overhaul (6cfaed2) switched from a vertical nav to horizontal, introducing both the variable-height nav AND the fixed-height assumption in the same commit.
Proposed fix
Use a standard layout pattern where nav takes its natural height and hero adjusts accordingly. No assumptions about nav height required.
Related
- Feature branch
feature/campaign-navexposes this - Original pattern: 6cfaed2
🤖 Generated with Claude Code