From 431ac02f418a18d4c83c9317d6f028dc51ab16f8 Mon Sep 17 00:00:00 2001 From: Stefan van der Walt Date: Thu, 13 Nov 2025 22:52:35 -0800 Subject: [PATCH] After theme update, make footer sticky again --- static/site.css | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/static/site.css b/static/site.css index 8cbd4aa..7d49406 100644 --- a/static/site.css +++ b/static/site.css @@ -1,24 +1,25 @@ -html, -body { - height: 100%; -} body { display: flex; flex-direction: column; + min-height: 100vh; +} + +main { + min-height: 0; + flex: 1 0 auto; } .article.content { /* Override 100vh from myst-theme:styles/typography.css so content div - * doesn't push the footer offscreen. + * doesn't grow
to push the footer offscreen. */ - min-height: 0vh; - flex: 1 0 auto; + min-height: 0; } .footer { /* Make footer "sticky" to page bottom (also the above flex rules), per * the flexbox strategy described here: - * https://css-tricks.com/couple-takes-sticky-footer/#aa-there-is-flexbox + * https://css-tricks.com/couple-takes-sticky-footer/#aa-there-is-flexbox * and here: * https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/ * This solution does not require hardcoding a fixed footer height in the