Skip to content

Stop the mobile nav drawer clipping search and Get Started - #404

Open
seandavi wants to merge 1 commit into
develfrom
fix/mobile-nav-clipping
Open

Stop the mobile nav drawer clipping search and Get Started#404
seandavi wants to merge 1 commit into
develfrom
fix/mobile-nav-clipping

Conversation

@seandavi

Copy link
Copy Markdown

Fixes #400.

.header-nav.active (assets/style/sections/header.css:181) set a hardcoded height: 21rem while .header-nav sets overflow: hidden. The drawer contains three things — the nav links, the site search form, and the Get Started button — and at 390 px the six nav links consume the full 21rem on their own. The search box and button rendered below the clip, present in the DOM but unreachable, with no scrollbar because the overflow is hidden rather than auto.

The change

-    height: 2px;
+    max-height: 0;

 .header-nav.active {
-    height: 21rem;
+    max-height: 100vh;
+    overflow-y: auto;

max-height rather than height: auto specifically because the drawer animates via transition: 0.3sheight: auto is not animatable, max-height is. overflow-y: auto is a fallback for viewports too short to fit the drawer at all.

Measured

Rendered the real layouts/components/header.html markup against the real stylesheets in headless Chromium at 390×844, and measured both states:

drawer height content height search box Get Started
height: 21rem (before) 336 px 440 px 404–429 clipped 445–493 clipped
max-height (after) 457 px 457 px 404–446 visible 462–510 visible

Absolute offsets differ slightly from the figures in #400 because this repro renders the header standalone rather than in a full page, but the clipping reproduces exactly and the fix resolves it.

Not included

#400 also mentions two related clipping/typography problems — .content { overflow: hidden } in layouts.css:32 and .page-container * { font-size: 1rem } in learn-and-dev.css:171-173. I've left both alone. Removing overflow: hidden from .content can change layout wherever it is currently containing floats, and the font-size rule affects the whole type scale on small screens; both want a visual pass across pages rather than a blind edit. Happy to do them as a follow-up if someone can eyeball the result.

🤖 Generated with Claude Code

https://claude.ai/code/session_01YBSvPwEk6sH1rhGmjPmsFq

.header-nav.active had a hardcoded height: 21rem with overflow: hidden.
The drawer contains the nav links, the site search form and the Get
Started button; at 390px the six links consume the full 21rem, so the
last two children rendered below the clip and could not be scrolled to.

Switch to max-height so the drawer sizes to its content, with
overflow-y: auto as a fallback on very short viewports. max-height keeps
the existing 0.3s open/close transition working, which a height: auto
would not.

Measured at 390x844: the old rule clipped the drawer to 336px against
440px of content, hiding both the search box and the button; with
max-height the drawer is 457px and both are within bounds.

Fixes #400

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YBSvPwEk6sH1rhGmjPmsFq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mobile nav drawer clips site search and "Get Started" out of reach

1 participant