Skip to content

Commit e85bfdf

Browse files
Merge pull request #1383 from GuillaumeGomez/footer-position
Fix footer positionning
2 parents 2318535 + c7db50c commit e85bfdf

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

templates/style/rustdoc.scss

+22-8
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
@import "vars", "navbar", "themes", "fa", "footer";
33

44
// This rule is needed to be sure that the footer will always be at the bottom of the page.
5-
body.rustdoc-page {
6-
min-height: 100vh;
5+
#rustdoc_body_wrapper {
6+
min-height: calc(100vh - #{$top-navbar-height + $footer-height + 2});
77
}
88

99
// Force the navbar to be left-aligned on rustdoc pages
@@ -15,30 +15,34 @@ div.container-rustdoc {
1515
text-align: left;
1616

1717
> .docs-rs-footer {
18-
bottom: -20px;
18+
bottom: -32px;
19+
right: -15px;
20+
width: unset;
1921
}
2022
}
2123

24+
div.container-rustdoc {
25+
width: unset;
26+
}
27+
2228
div.container-rustdoc:not(.source) {
2329
> .docs-rs-footer {
24-
right: -15px;
25-
width: calc(100vw - 212px);
30+
left: 185px; // This is the left sidebar
2631
}
2732

2833
// This is when the rustdoc sidebar "disappears" (for mobile mode).
2934
@media (max-width: 700px) {
3035
> .docs-rs-footer:not(.source) {
31-
width: 100vw;
36+
left: -15px;
3237
}
3338
}
3439
}
3540

3641
div.container-rustdoc.source {
3742
> .docs-rs-footer {
38-
width: 100vw;
3943
left: -15px;
4044
// This is needed because even though the sidebar only contains the header, it still takes
41-
// all the height.
45+
// all the height, going over the footer.
4246
z-index: 1;
4347
}
4448
}
@@ -110,4 +114,14 @@ div.rustdoc {
110114
&:focus {
111115
outline: unset;
112116
}
117+
118+
// Overriding some outdated rustdoc CSS rules
119+
#results {
120+
position: initial !important;
121+
overflow: initial !important;
122+
123+
> table {
124+
margin-bottom: 0 !important;
125+
}
126+
}
113127
}

0 commit comments

Comments
 (0)