From b3c44e30823a27a4efa6aab2b39669d95bcd5e2a Mon Sep 17 00:00:00 2001 From: Marco Date: Wed, 22 Jul 2026 18:24:14 +0000 Subject: [PATCH] Fix invisible mobile nav drawer, redesign its open/close as a modern fade MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Root cause: the
had a fixed h-[6.25rem], not min-h. Its flex-col first child (top row) has shrink-0 and always fills all 6.25rem, leaving zero room for the drawer panel — the panel's own overflow-hidden (needed for its animation) resets flexbox's automatic min-height to 0, so it got crushed to a literal 0px box regardless of its own max-height. The hamburger button itself always worked (toggled to "X" correctly); the panel it opened was rendering at zero height beneath it, at every breakpoint where it exists (below lg/1024px). Also replaced the max-height-accordion technique with a CSS grid-rows (0fr/1fr) transition — no more guessing/capping a max-height — plus an opacity+translateY fade on the inner content for a softer, more modern open/close instead of a flat height-only reveal. Co-Authored-By: Claude Sonnet 5 Claude-Session: https://claude.ai/code/session_018PL4zfTY1sXc8x5QS6FatM --- app/components/Navbar.tsx | 161 ++++++++++++++++++++++---------------- 1 file changed, 94 insertions(+), 67 deletions(-) diff --git a/app/components/Navbar.tsx b/app/components/Navbar.tsx index 352d077..2224534 100644 --- a/app/components/Navbar.tsx +++ b/app/components/Navbar.tsx @@ -345,7 +345,18 @@ export function Navbar({ singleActiveProduct }: { singleActiveProduct: boolean } // position itself. <>
- {/* Mobile drawer panel — toggleable below lg (see hamburger above) */} + {/* Mobile drawer panel — toggleable below lg (see hamburger above). + `grid-rows-[0fr]/[1fr]` (not a guessed max-h-[Nrem]) is what + actually animates the open/close height — a CSS grid row sized in + `fr` units transitions smoothly between 0 and its content's real + height with no fixed cap to guess/outgrow, the modern replacement + for the old max-height-accordion trick. `overflow-hidden` has to + live on the *inner* div, not this one — collapsing a 0fr grid row + already clips its content on its own, and this outer element is + also where the opacity/translate fade below is applied, which + must NOT itself be clipped (a translateY sliding a hidden/clipped + element in doesn't read as a fade-in, just a hard cut). */}
- +
+ + + 7-Tage-Challenge + +
+ +