fix: overlay mobile navigation without shifting page content

This commit is contained in:
Gabriel20xx committed 2026-10-27 09:22:51 +00:00
1 parent 37a4a8e2ca
commit b776bacd70
3 files changed
+31 -6

No files matched your search

@@ -0,0 +1,5 @@
---
"@gabriel20xx/web-ui": patch
---
Open the mobile navigation menu as an overlay below the header instead of inserting it into the header row. Opening the menu no longer pushes the page content down, and long menus scroll within the viewport.
+13 -3
View File
@@ -1111,13 +1111,23 @@ html[data-wide-layout='true'] .sc-main {
transform: translateX(-50%); transform: translateX(-50%);
} }
/* Overlay the page below the header instead of wrapping onto a new row, so opening the menu
doesn't push the content down. */
.sc-nav { .sc-nav {
display: none; display: none;
flex-basis: 100%; position: absolute;
order: 4; top: 100%;
right: 0;
left: 0;
z-index: 20;
flex-direction: column; flex-direction: column;
align-items: stretch; align-items: stretch;
padding-bottom: 0.25rem; max-height: calc(100dvh - 4rem);
padding: 0.5rem 1rem 0.75rem;
overflow-y: auto;
background: var(--sc-surface);
border-bottom: 1px solid var(--sc-border);
box-shadow: var(--sc-shadow-lg);
} }
.sc-nav[data-open="true"] { .sc-nav[data-open="true"] {
+13 -3
View File
@@ -1111,13 +1111,23 @@ html[data-wide-layout='true'] .sc-main {
transform: translateX(-50%); transform: translateX(-50%);
} }
/* Overlay the page below the header instead of wrapping onto a new row, so opening the menu
doesn't push the content down. */
.sc-nav { .sc-nav {
display: none; display: none;
flex-basis: 100%; position: absolute;
order: 4; top: 100%;
right: 0;
left: 0;
z-index: 20;
flex-direction: column; flex-direction: column;
align-items: stretch; align-items: stretch;
padding-bottom: 0.25rem; max-height: calc(100dvh - 4rem);
padding: 0.5rem 1rem 0.75rem;
overflow-y: auto;
background: var(--sc-surface);
border-bottom: 1px solid var(--sc-border);
box-shadow: var(--sc-shadow-lg);
} }
.sc-nav[data-open="true"] { .sc-nav[data-open="true"] {