Skip to content

Commit 17bf500

Browse files
Merge pull request #1625 from jsha/sidebar-shown-top
Add top and height settings for mobile sidebar
2 parents b6f9f61 + 89c46f0 commit 17bf500

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

templates/style/rustdoc-common.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,16 @@ div.rustdoc {
9898
top: $top-navbar-height;
9999
}
100100
}
101+
102+
// A later version of rustdoc uses the .sidebar.shown instead of .sidebar.mobile, and
103+
// also needs a height adjustment.
104+
&.shown {
105+
width: 250px;
106+
margin-left: 0;
107+
// 45px is the size of the rustdoc mobile-topbar
108+
top: 45px + $top-navbar-height !important;
109+
height: calc(100vh - 45px - #{$top-navbar-height}) !important;
110+
}
101111
}
102112
}
103113

0 commit comments

Comments
 (0)