fix(web): sidebar reste fixe sur page longue, page Liste de courses centrée
- AppLayout: .app-layout passe de min-height:100vh à height:100vh + overflow:hidden, et .app-content devient le vrai conteneur de scroll (overflow-y:auto). Avant, une page plus haute que le viewport faisait défiler tout le document, entraînant la sidebar avec lui au lieu de la garder fixe. - ComingSoonPage (page "Liste de courses"): ajoute margin:0 auto, comme .settings-page, au lieu de rester collée au bord gauche avec un grand espace vide à droite sur les écrans larges.
This commit is contained in:
parent
c34eaa89d0
commit
1c362c2d1f
2 changed files with 21 additions and 1 deletions
|
|
@ -7,8 +7,14 @@
|
||||||
// No `@use` of the theme partial needed here — see HomePage.scss's identical
|
// No `@use` of the theme partial needed here — see HomePage.scss's identical
|
||||||
// note: every token below is a CSS custom property, available at runtime.
|
// note: every token below is a CSS custom property, available at runtime.
|
||||||
|
|
||||||
|
// `height` (not `min-height`): the layout must stay pinned to exactly the
|
||||||
|
// viewport, never grow taller than it — otherwise a tall page scrolls the
|
||||||
|
// whole document, dragging the sidebar out of view with it. `overflow:
|
||||||
|
// hidden` backs that up so nothing can force the document itself to grow;
|
||||||
|
// `.app-content` below is the one place that actually scrolls.
|
||||||
.app-layout {
|
.app-layout {
|
||||||
min-height: 100vh;
|
height: 100vh;
|
||||||
|
overflow: hidden;
|
||||||
display: flex;
|
display: flex;
|
||||||
background: var(--color-background);
|
background: var(--color-background);
|
||||||
}
|
}
|
||||||
|
|
@ -27,6 +33,10 @@
|
||||||
background: var(--color-surface);
|
background: var(--color-surface);
|
||||||
border-right: 1px solid var(--color-border);
|
border-right: 1px solid var(--color-border);
|
||||||
transition: width 0.15s ease;
|
transition: width 0.15s ease;
|
||||||
|
// Own scroll, independent of `.app-content` — only matters on a very
|
||||||
|
// short viewport with a long nav, but keeps the rail from ever forcing
|
||||||
|
// `.app-layout` past 100vh.
|
||||||
|
overflow-y: auto;
|
||||||
|
|
||||||
&__top {
|
&__top {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
@ -315,6 +325,11 @@
|
||||||
// Content can scroll independently of the sidebar (e.g. a long planning
|
// Content can scroll independently of the sidebar (e.g. a long planning
|
||||||
// table) without the fixed-width rail ever needing to shrink.
|
// table) without the fixed-width rail ever needing to shrink.
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
|
// The actual scroll container: `.app-layout` is pinned to `height: 100vh`
|
||||||
|
// above, so a page taller than the viewport scrolls in here instead of
|
||||||
|
// scrolling the document (which would drag the sidebar along with it).
|
||||||
|
min-height: 0;
|
||||||
|
overflow-y: auto;
|
||||||
padding: var(--space-xl);
|
padding: var(--space-xl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,13 @@
|
||||||
// Styles for ComingSoonPage — shared by every stub section page.
|
// Styles for ComingSoonPage — shared by every stub section page.
|
||||||
// =============================================================================
|
// =============================================================================
|
||||||
|
|
||||||
|
// Centered, not pinned to `.app-content`'s left edge — same reasoning as
|
||||||
|
// `.settings-page` (settings-pages.scss): on a wide desktop viewport a
|
||||||
|
// left-aligned `max-width` here just left a lopsided gap down the right
|
||||||
|
// side instead of framing the placeholder copy.
|
||||||
.coming-soon-page {
|
.coming-soon-page {
|
||||||
max-width: 40rem;
|
max-width: 40rem;
|
||||||
|
margin: 0 auto;
|
||||||
|
|
||||||
p {
|
p {
|
||||||
color: var(--color-text-muted);
|
color: var(--color-text-muted);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue