From 83617ae7c4da3a4f20f6db9619f3dc65d59b4ee6 Mon Sep 17 00:00:00 2001 From: ChristopherPHolder Date: Sat, 28 Nov 2026 09:02:56 +0100 Subject: [PATCH] fix: an open phone menu scrolls, and the page behind it stays still Docs: the phone menu, a fixed panel between the header and the bottom of the screen, kept align-self: start from the wide layout's sticky sidebar. Chrome now applies align-self to fixed boxes, so the panel was as tall as its links, started behind the header and had nothing to scroll. It now stretches between its insets. Movies: while the drawer is open over the page, the page doesn't scroll, and the drawer's list keeps its scroll at either end, so a drag on the drawer no longer moves the page behind it. Closes #98 --- apps/docs/src/styles.css | 3 +++ apps/movies/src/app/app-shell/app-shell.component.scss | 2 ++ apps/movies/src/styles.scss | 9 +++++++++ 3 files changed, 14 insertions(+) diff --git a/apps/docs/src/styles.css b/apps/docs/src/styles.css index 26d6cd9..e881acd 100644 --- a/apps/docs/src/styles.css +++ b/apps/docs/src/styles.css @@ -475,6 +475,9 @@ details[open] > summary.sidebar-title::after { z-index: 2; width: min(100%, 22rem); max-height: none; + /* Fills the space between the insets, so it scrolls. With the wide layout's + start, a fixed box is as tall as its links and runs off the screen. */ + align-self: stretch; padding: var(--space-5) var(--space-5) var(--space-10); border-left: 1px solid var(--color-border); background: var(--color-surface); diff --git a/apps/movies/src/app/app-shell/app-shell.component.scss b/apps/movies/src/app/app-shell/app-shell.component.scss index fe7932f..ab05e4d 100644 --- a/apps/movies/src/app/app-shell/app-shell.component.scss +++ b/apps/movies/src/app/app-shell/app-shell.component.scss @@ -202,6 +202,8 @@ ui-side-drawer { flex-direction: column; flex: 1; overflow: auto; + /* At either end of the list, a drag stops there instead of moving the page. */ + overscroll-behavior: contain; font-size: var(--text-md); font-weight: bold; contain: content; diff --git a/apps/movies/src/styles.scss b/apps/movies/src/styles.scss index d4be007..cd914ff 100644 --- a/apps/movies/src/styles.scss +++ b/apps/movies/src/styles.scss @@ -32,6 +32,15 @@ body { } } +/* While the drawer is open over the page, the page stays where it is: a drag + on the drawer scrolls its list, not the page behind it. From 1298px the + drawer is a column beside the page (side-drawer.component.scss). */ +@media screen and (max-width: 1297px) { + html:has(.side-drawer.opened) { + overflow: hidden; + } +} + body.dark img:not([src*='.svg']) { filter: var(--image-filter); }