diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css
index 99a0f8c3fb1..308182e6a0e 100644
--- a/src/librustdoc/html/static/rustdoc.css
+++ b/src/librustdoc/html/static/rustdoc.css
@@ -822,6 +822,7 @@ span.since {
margin-left: -15px;
padding: 0 15px;
position: static;
+ z-index: 1;
}
.sidebar > .location {
@@ -848,25 +849,34 @@ span.since {
}
.sidebar-menu {
- position: absolute;
+ position: fixed;
+ z-index: 10;
font-size: 2rem;
cursor: pointer;
- margin-top: 2px;
+ width: 45px;
+ left: 0;
+ text-align: center;
display: block;
+ border-bottom: 1px solid;
+ border-right: 1px solid;
}
.sidebar-elems {
- background-color: #F1F1F1;
position: fixed;
z-index: 1;
left: 0;
top: 45px;
bottom: 0;
overflow-y: auto;
- border-right: 1px solid #000;
+ border-right: 1px solid;
display: none;
}
+ .sidebar > .block.version {
+ border-bottom: none;
+ margin-top: 12px;
+ }
+
nav.sub {
margin: 0 auto;
}
diff --git a/src/librustdoc/html/static/styles/main.css b/src/librustdoc/html/static/styles/main.css
index 5cace837a55..c31808cfc0f 100644
--- a/src/librustdoc/html/static/styles/main.css
+++ b/src/librustdoc/html/static/styles/main.css
@@ -330,3 +330,16 @@ pre.ignore:hover, .information:hover + pre.ignore {
.modal-content > .close:hover + .whiter {
background-color: #ff1f1f;
}
+
+@media (max-width: 700px) {
+ .sidebar-menu {
+ background-color: #F1F1F1;
+ border-bottom-color: #e0e0e0;
+ border-right-color: #e0e0e0;
+ }
+
+ .sidebar-elems {
+ background-color: #F1F1F1;
+ border-right-color: #000;
+ }
+}