From 82b4f99f4d556959dac55412436cd1308acd2ba6 Mon Sep 17 00:00:00 2001 From: Christopher Byrd Date: Tue, 17 Nov 2026 10:39:41 -0600 Subject: [PATCH] Header: fold the nav behind Menu below 1200px, not 1080px The one-row header (wordmark, nine nav items, theme toggle) needs about 1160px with Public Sans, so between 1080 and 1150px it wrapped onto two rows. The Menu-button breakpoint moves to 1200px, which leaves about 40px of room at the narrowest one-row width. The --header-h breakpoint in tokens.css moves with it, so the sticky offset still matches the band's height (68px with Menu, 64px without). Closes #45 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_012CEyiXRPrNfjwX3iEx99dw --- src/components/Header.astro | 7 +++++-- src/styles/tokens.css | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/Header.astro b/src/components/Header.astro index cd01cb6..bf49f6e 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -7,7 +7,10 @@ import { NAV, GITHUB } from '../site.config'; * the nav so an open menu is the next Tab stop. The nav marks the current section with aria-current * (a link is current when the page path starts with its href). * - * Below 1080px the nav folds behind the Menu button and opens inside the band as full-width rows. + * Below 1200px the nav folds behind the Menu button and opens inside the band as full-width rows. + * The one-row header (wordmark, nav, GitHub and theme toggle) needs about 1160px with Public Sans, + * so 1200px leaves about 40px of room. Measure again if a nav label grows, and move the matching + * --header-h breakpoint in tokens.css with this one. * Without JavaScript (no `.js` on ) the button stays hidden and the nav wraps under the * wordmark instead. * @@ -178,7 +181,7 @@ const isCurrent = (href: string) => path === href || path.startsWith(href); /* Narrow screens: wordmark, theme toggle and Menu on one row; the nav opens below them. Without JavaScript the nav wraps as a row under the wordmark. */ - @media (max-width: 1079px) { + @media (max-width: 1199px) { .bar { gap: 0; padding-block: 12px; diff --git a/src/styles/tokens.css b/src/styles/tokens.css index edd4cfd..05551b3 100644 --- a/src/styles/tokens.css +++ b/src/styles/tokens.css @@ -99,7 +99,8 @@ /* Height of the sticky masthead row; sticky columns and anchor jumps sit below it. */ --header-h: 64px; } -@media (max-width: 1079px) { +/* The header's Menu-button breakpoint (Header.astro), where the band is 68px tall. */ +@media (max-width: 1199px) { :root { --header-h: 68px; }