Skip to content

Commit 89c46f0

Browse files
committed
Add top and height settings for mobile sidebar
The CSS classes for the mobile sidebar changed recently, so use the new classes. Also set the height of the sidebar appropriately. This fixes a bug where the sidebar is on top of the hamburger menu, which prevents closing it once you've opened it.
1 parent 142844e commit 89c46f0

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)