ui: Sticky-Footer auf allen Seiten — Body von Grid auf Flex-Spalte
Nicht-Home-Seiten nutzten ein Grid-Sticky-Layout, das den Footer durch die zusätzliche Breadcrumb-Zeile (impliziter Grid-Row) nicht zuverlässig unten hielt. Body jetzt durchgehend Flex-Spalte wie Home: min-height:100dvh, main flex:1 → Footer klebt unten. Inhaltsspalte (72ch + 1.75rem Gutter) per max-width/margin-inline zentriert, Header/Footer volle Breite (eigenes inneres Raster zentriert deren Inhalt), Full-Bleed-Hero rechnet sich weiter korrekt aus. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
+18
-21
@@ -90,28 +90,25 @@ body {
|
||||
line-height: 1.55;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
min-height: 100vh;
|
||||
/* overflow-x + scrollbar-gutter liegen jetzt auf html (Wurzel) → Body füllt
|
||||
konsistent die gleiche Breite auf allen Seiten. */
|
||||
/* nur Zeilen-Abstand (Header/Main/Footer); KEIN Spalten-Gap, sonst entstehen
|
||||
ungleiche Ränder an der Inhaltsspalte (der „weiße Spalt"). */
|
||||
row-gap: var(--spacing-sm);
|
||||
column-gap: 0;
|
||||
display: grid;
|
||||
grid-template-rows: auto 1fr auto;
|
||||
justify-content: stretch;
|
||||
/* Boxed content column = 72ch with 1.75rem gutters, side columns absorb the rest */
|
||||
grid-template-columns:
|
||||
1fr
|
||||
min(var(--container-width), 100% - 3.5rem)
|
||||
1fr;
|
||||
/* Flex-Spalte → STICKY FOOTER auf allen Seiten: main wächst (flex:1), Footer
|
||||
behält Inhaltshöhe und klebt unten. (overflow-x + scrollbar-gutter: html.) */
|
||||
min-height: 100dvh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
/* Default: every direct body child sits in the content column */
|
||||
body > * { grid-column: 2; }
|
||||
/* Opt-in: full-bleed children break out edge-to-edge */
|
||||
body > .full-bleed,
|
||||
body > header.site-header,
|
||||
body > footer { grid-column: 1 / -1; }
|
||||
/* Inhaltsspalte zentrieren = 72ch + 1.75rem Gutter (Home ist Vollbreite).
|
||||
Header/Footer bleiben volle Breite (eigenes inneres Raster zentriert sie). */
|
||||
body:not(.is-home) > main,
|
||||
body:not(.is-home) > .page-foot-nav {
|
||||
width: 100%;
|
||||
max-width: calc(var(--container-width) + 3.5rem);
|
||||
margin-inline: auto;
|
||||
padding-inline: 1.75rem;
|
||||
}
|
||||
body:not(.is-home) > main { flex: 1 0 auto; } /* füllt → Footer unten */
|
||||
body:not(.is-home) > header.site-header,
|
||||
body:not(.is-home) > .page-foot-nav,
|
||||
body:not(.is-home) > footer { flex: none; }
|
||||
|
||||
|
||||
p { margin: var(--spacing-sm) 0; }
|
||||
|
||||
Reference in New Issue
Block a user