Skip to content

Fix sidebar rendering bugs #1233

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 1, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions templates/style/rustdoc.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ body.blur {

// rustdoc overrides
div.rustdoc {
$padding-x: 15px;
font-family: $font-family-serif;
padding: 10px 15px 20px 15px;
padding: 10px $padding-x 20px;
position: relative;

@media (max-width: 700px) {
Expand All @@ -47,11 +48,16 @@ div.rustdoc {
}

@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: 77px;
.sidebar-elems.show-it {
top: 45px + $top-navbar-height;
}

#sidebar-filler {
Expand Down