Keep the header at the top of the window on wider screens

The signed-in header is sticky from the md breakpoint up, so only the
page content scrolls; on phones and at high zoom it still scrolls with
the page, where a wrapped sticky header would take too much of the view.
A small layout script sets scroll-padding-top to the header's height
while it is sticky, so focused elements, anchors and the skip link
target land below it (WCAG 2.4.11).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
2026-11-25 07:18:55 +02:00
co-authored by Claude Opus 5.5
parent 45dbb04344
commit 60cab4b871
3 changed files with 78 additions and 1 deletions
+5
View File
@@ -34,6 +34,11 @@
--color-primary-800: #312e81;
}
/* The sticky header's height (set by the layout), so focus and anchors land below it. */
html {
scroll-padding-top: var(--app-header-offset, 0px);
}
[x-cloak] {
display: none !important;
}