Skip to content

Commit cc7f5fa

Browse files
Mazizovaclaude
andauthored
Mobile menu: make the open menu scrollable (#123)
The open mobile menu is a fixed panel with every group expanded, about 930px tall — taller than an iPhone screen — so the bottom items (Resources, Suggest a resource) could not be reached, as a fixed element is not scrolled by the page. Cap its height to the viewport (dvh, with a vh fallback) and let it scroll. Co-authored-by: Claude Sonnet 5.5 <noreply@anthropic.com>
1 parent 9c06227 commit cc7f5fa

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎assets/scss/_header.scss‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,15 @@
279279
margin-left: 0;
280280
z-index: 99;
281281

282+
// The open menu is taller than a phone screen (every group is expanded),
283+
// and a fixed element can't be scrolled by the page — so it scrolls itself.
284+
max-height: calc(100vh - 64px);
285+
max-height: calc(100dvh - 64px);
286+
overflow-y: auto;
287+
overscroll-behavior: contain;
288+
-webkit-overflow-scrolling: touch;
289+
padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
290+
282291
&.open {
283292
display: flex;
284293
}

0 commit comments

Comments
 (0)