From fd15338bd04d7a78c9ffde0015850a562daa8c45 Mon Sep 17 00:00:00 2001 From: Harkamal Randhawa Date: Sun, 24 May 2026 04:09:13 -0600 Subject: [PATCH] Hide bottom nav labels on narrow widths and enlarge icons. Use a container query so cramped nav items show icon-only mode with accessible labels via aria-label. --- app/globals.css | 22 ++++++++++++++++++++++ components/layout/app-nav.tsx | 15 ++++++++++----- 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/app/globals.css b/app/globals.css index da5233a..58ca848 100644 --- a/app/globals.css +++ b/app/globals.css @@ -142,6 +142,28 @@ @apply border-2 border-border bg-card text-card-foreground; box-shadow: var(--retro-shadow); } + + .bottom-nav { + container-type: inline-size; + container-name: bottom-nav; + } + + @container bottom-nav (max-width: 32rem) { + .bottom-nav-item-label { + display: none; + } + + .bottom-nav-item { + gap: 0; + padding-top: 0.625rem; + padding-bottom: 0.625rem; + } + + .bottom-nav-item-icon { + height: 1.75rem; + width: 1.75rem; + } + } } @layer utilities { diff --git a/components/layout/app-nav.tsx b/components/layout/app-nav.tsx index a004c13..e651378 100644 --- a/components/layout/app-nav.tsx +++ b/components/layout/app-nav.tsx @@ -45,7 +45,7 @@ export function AppNav({ items = appNavItems }: AppNavProps) { return ( ); -} \ No newline at end of file +}