diff --git a/app/components/Navbar.tsx b/app/components/Navbar.tsx index 0833d60..7056779 100644 --- a/app/components/Navbar.tsx +++ b/app/components/Navbar.tsx @@ -113,7 +113,7 @@ function AccountLink() { {/* -translate-y-0.5 — the glyph's own bounding box centers fine mathematically, but the round head (light, isolated) versus the @@ -135,10 +135,11 @@ function AccountLink() { // Wishlist icon + count badge — only rendered by the caller when // `wishlistEnabled` (CompanySettings). Visible at every width, alongside -// Search/Account/Cart — confirmed by an actual 320px-viewport check (see -// this file's git history) that all 4 icons fit without wrapping/overflow -// once sized down slightly on the smallest screens (see the h-11/w-11 → -// h-10/w-10 max-[375px] override below and on the sibling icon buttons). +// Search/Account/Cart — all 4 stay full 44px touch targets even on the +// smallest phones (shrinking them was tried and reverted: it made them +// hard to hit accurately). The logo shrinks further below 375px instead +// to make room — confirmed via an actual Playwright viewport sweep down +// to 320px that this fits without wrapping/overflow (see git history). function WishlistLink() { const { count } = useWishlist(); @@ -146,7 +147,7 @@ function WishlistLink() { 0 ? `Merkliste, ${count} Artikel` : "Merkliste"} - className="relative flex h-11 w-11 max-[375px]:h-10 max-[375px]:w-10 items-center justify-center shrink-0 active:scale-[0.9] transition-transform" + className="relative flex h-11 w-11 items-center justify-center shrink-0 active:scale-[0.9] transition-transform" >
+
{/* Logo — real navigation to "/" from anywhere else; only when @@ -453,7 +454,7 @@ export function Navbar({ while leaving that page's content on screen. */} { @@ -467,11 +468,13 @@ export function Navbar({ > {/* Fixed width/height are the real file dimensions (Next Image needs them for optimization/layout); the wrapping Link's own - w-[130px] sm:w-[181px] + h-auto here is what actually shrinks - the rendered logo below 640px — there wasn't enough header - width for 4 icons + hamburger otherwise (confirmed via an - actual Playwright viewport sweep down to 320px, not - assumed). */} + w-[112px] min-[375px]:w-[130px] sm:w-[181px] + h-auto here is + what actually shrinks the rendered logo below 640px — there + wasn't enough header width for 4 full-44px icons + hamburger + otherwise (confirmed via an actual Playwright viewport sweep + down to 320px, not assumed) — the icons themselves are never + shrunk (see WishlistLink's own comment on why), so the logo + is what gives on the very smallest phones instead. */} einfach produktiv + the fluid token scale the way Hero/About/etc. were. + + The gap itself, though, does scale fluidly — just on its own + 1024-1300px range (this nav's own floor/ceiling, only ever + relevant while it's actually visible), not the site-wide + 640-1440px scale: clamp(1.5rem, 8.696vw - 4.065rem, 3rem) is + gap-6 (1.5rem) at exactly 1024px, gap-12 (3rem) from 1300px + up, and eases linearly between — the fixed 48px gap read as + too wide right where the nav labels themselves have the + least room (just above 1024px). */} +