Skip to content

Commit 3ffe713

Browse files
authored
After theme update, make footer sticky again (#16)
1 parent 6356ca4 commit 3ffe713

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

static/site.css

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,25 @@
1-
html,
2-
body {
3-
height: 100%;
4-
}
51
body {
62
display: flex;
73
flex-direction: column;
4+
min-height: 100vh;
5+
}
6+
7+
main {
8+
min-height: 0;
9+
flex: 1 0 auto;
810
}
911

1012
.article.content {
1113
/* Override 100vh from myst-theme:styles/typography.css so content div
12-
* doesn't push the footer offscreen.
14+
* doesn't grow <main> to push the footer offscreen.
1315
*/
14-
min-height: 0vh;
15-
flex: 1 0 auto;
16+
min-height: 0;
1617
}
1718

1819
.footer {
1920
/* Make footer "sticky" to page bottom (also the above flex rules), per
2021
* the flexbox strategy described here:
21-
* https://css-tricks.com/couple-takes-sticky-footer/#aa-there-is-flexbox
22+
* https://css-tricks.com/couple-takes-sticky-footer/#aa-there-is-flexbox
2223
* and here:
2324
* https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/
2425
* This solution does not require hardcoding a fixed footer height in the

0 commit comments

Comments
 (0)