Skip to content

Commit 3f70e19

Browse files
brianhawthornejarrodmillman
authored andcommitted
document sticky footer solution, per stefanv's out of band PR review
1 parent ab5aede commit 3f70e19

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

site.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,22 @@ body {
77
}
88

99
.article.content {
10+
/* Override 100vh from myst-theme:styles/typography.css so content div
11+
* doesn't push the footer offscreen.
12+
*/
1013
min-height: 0vh;
1114
flex: 1 0 auto;
1215
}
1316

1417
.footer {
18+
/* Make footer "sticky" to page bottom (also the above flex rules), per
19+
* the flexbox strategy described here:
20+
* https://css-tricks.com/couple-takes-sticky-footer/#aa-there-is-flexbox
21+
* and here:
22+
* https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/
23+
* This solution does not require hardcoding a fixed footer height in the
24+
* style rules.
25+
*/
1526
flex-shrink: 0;
1627
background: #013243;
1728
color: white;

0 commit comments

Comments
 (0)