-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6e354ec
commit 60c8bd9
Showing
11 changed files
with
230 additions
and
115 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
// FIXME: Use modules | ||
@import "rustdoc-common"; | ||
|
||
// This file is needed to overload the previous docs.rs style. It is added into crates generated | ||
// using rustdoc after https://github.com/rust-lang/rust/pull/91356 has been merged. | ||
|
||
#rustdoc_body_wrapper { | ||
padding: 0; | ||
|
||
.sidebar { | ||
margin-top: 0; | ||
top: $top-navbar-height; | ||
|
||
.sidebar-menu { | ||
top: $top-navbar-height; | ||
} | ||
} | ||
|
||
main { | ||
padding-bottom: 50px; | ||
} | ||
} | ||
|
||
div.container-rustdoc { | ||
> .docs-rs-footer { | ||
bottom: 0; | ||
right: 0; | ||
} | ||
} | ||
|
||
div.container-rustdoc:not(.source) { | ||
> .docs-rs-footer { | ||
left: 200px; | ||
} | ||
} | ||
|
||
div.rustdoc { | ||
#sidebar-toggle { | ||
top: 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,121 @@ | ||
// FIXME: Use modules | ||
@import "vars", "navbar", "themes", "fa", "footer"; | ||
|
||
// This rule is needed to be sure that the footer will always be at the bottom of the page. | ||
#rustdoc_body_wrapper { | ||
min-height: calc(100vh - #{$top-navbar-height + $footer-height + 2}); | ||
} | ||
|
||
#clipboard { | ||
cursor: pointer; | ||
} | ||
|
||
// Force the navbar to be left-aligned on rustdoc pages | ||
body.rustdoc-page > .nav-container > .container { | ||
margin-left: 0; | ||
} | ||
|
||
div.container-rustdoc { | ||
text-align: left; | ||
|
||
> .docs-rs-footer { | ||
width: unset; | ||
} | ||
} | ||
|
||
div.container-rustdoc { | ||
width: unset; | ||
} | ||
|
||
div.container-rustdoc:not(.source) { | ||
// This is when the rustdoc sidebar "disappears" (for mobile mode). | ||
@media (max-width: 700px) { | ||
> .docs-rs-footer:not(.source) { | ||
left: -15px; | ||
} | ||
} | ||
} | ||
|
||
div.container-rustdoc.source { | ||
> .docs-rs-footer { | ||
left: -15px; | ||
// This is needed because even though the sidebar only contains the header, it still takes | ||
// all the height, going over the footer. | ||
z-index: 1; | ||
} | ||
} | ||
|
||
// this is a super nasty override for help dialog in rustdocs | ||
// see #52 for details | ||
body.blur { | ||
> :not(#help) { | ||
filter: none; | ||
-webkit-filter: none; | ||
} | ||
|
||
> div.nav-container > *, | ||
> div.docsrs-package-container > *, | ||
> div.rustdoc > :not(#help) { | ||
filter: blur(8px); | ||
-webkit-filter: blur(8px); | ||
opacity: 0.7; | ||
} | ||
} | ||
|
||
// rustdoc overrides | ||
div.rustdoc { | ||
$padding-x: 15px; | ||
padding: 10px $padding-x 20px; | ||
position: relative; | ||
|
||
@media (max-width: 700px) { | ||
padding-top: 0; | ||
} | ||
|
||
.sidebar { | ||
@media (min-width: 701px) { | ||
margin-top: $top-navbar-height; | ||
} | ||
|
||
.block > ul > li { | ||
margin-right: -10px; | ||
} | ||
|
||
@media (max-width: 700px) { | ||
margin-left: -2 * $padding-x; // offset the additional padding added by the parent containers | ||
width: calc(100% + #{4 * $padding-x}); | ||
|
||
&.mobile { | ||
top: $top-navbar-height; | ||
margin-left: 0; // since the sidebar is now fixed position, remove the padding workaround | ||
width: 100%; | ||
|
||
.sidebar-elems.show-it { | ||
top: 45px + $top-navbar-height; | ||
} | ||
|
||
#sidebar-filler { | ||
top: $top-navbar-height; | ||
} | ||
} | ||
} | ||
} | ||
|
||
#source-sidebar { | ||
top: $top-navbar-height; | ||
} | ||
|
||
&:focus { | ||
outline: unset; | ||
} | ||
|
||
// Overriding some outdated rustdoc CSS rules | ||
#results { | ||
position: initial !important; | ||
overflow: initial !important; | ||
|
||
> table { | ||
margin-bottom: 0 !important; | ||
} | ||
} | ||
} |
Oops, something went wrong.