diff --git a/src/librustdoc/html/static/rustdoc.css b/src/librustdoc/html/static/rustdoc.css
index 358549117a307..70984ea3e72ac 100644
--- a/src/librustdoc/html/static/rustdoc.css
+++ b/src/librustdoc/html/static/rustdoc.css
@@ -998,6 +998,195 @@ span.since {
opacity: 1;
}
+.information {
+ position: absolute;
+ left: -20px;
+ margin-top: 7px;
+ z-index: 1;
+}
+
+.tooltip {
+ position: relative;
+ display: inline-block;
+ cursor: pointer;
+}
+
+.tooltip .tooltiptext {
+ width: 120px;
+ display: none;
+ text-align: center;
+ padding: 5px 3px;
+ border-radius: 6px;
+ margin-left: 5px;
+ top: -5px;
+ left: 105%;
+ z-index: 10;
+}
+
+.tooltip:hover .tooltiptext {
+ display: inline;
+}
+
+.tooltip .tooltiptext::after {
+ content: " ";
+ position: absolute;
+ top: 50%;
+ left: 11px;
+ margin-top: -5px;
+ border-width: 5px;
+ border-style: solid;
+}
+
+.important-traits .tooltip .tooltiptext {
+ border: 1px solid;
+}
+
+pre.rust {
+ position: relative;
+ tab-width: 4;
+ -moz-tab-width: 4;
+}
+
+.search-failed {
+ text-align: center;
+ margin-top: 20px;
+}
+
+.search-failed > ul {
+ text-align: left;
+ max-width: 570px;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+#titles {
+ height: 35px;
+}
+
+#titles > div {
+ float: left;
+ width: 33.3%;
+ text-align: center;
+ font-size: 18px;
+ cursor: pointer;
+ border-top: 2px solid;
+}
+
+#titles > div:not(:last-child) {
+ margin-right: 1px;
+ width: calc(33.3% - 1px);
+}
+
+#titles > div > div.count {
+ display: inline-block;
+ font-size: 16px;
+}
+
+.important-traits {
+ cursor: pointer;
+ z-index: 2;
+}
+
+h4 > .important-traits {
+ position: absolute;
+ left: -44px;
+ top: 2px;
+}
+
+#all-types {
+ text-align: center;
+ border: 1px solid;
+ margin: 0 10px;
+ margin-bottom: 10px;
+ display: block;
+ border-radius: 7px;
+}
+#all-types > p {
+ margin: 5px 0;
+}
+
+#sidebar-toggle {
+ position: fixed;
+ top: 30px;
+ left: 300px;
+ z-index: 10;
+ padding: 3px;
+ border-top-right-radius: 3px;
+ border-bottom-right-radius: 3px;
+ cursor: pointer;
+ font-weight: bold;
+ transition: left .5s;
+ font-size: 1.2em;
+ border: 1px solid;
+ border-left: 0;
+}
+#source-sidebar {
+ position: fixed;
+ top: 0;
+ bottom: 0;
+ left: 0;
+ width: 300px;
+ z-index: 1;
+ overflow: auto;
+ transition: left .5s;
+ border-right: 1px solid;
+}
+#source-sidebar > .title {
+ font-size: 1.5em;
+ text-align: center;
+ border-bottom: 1px solid;
+ margin-bottom: 6px;
+}
+
+.theme-picker {
+ position: absolute;
+ left: 211px;
+ top: 19px;
+}
+
+.theme-picker button {
+ outline: none;
+}
+
+#settings-menu {
+ position: absolute;
+ right: 0;
+ top: 10px;
+ outline: none;
+}
+
+#theme-picker, #settings-menu {
+ padding: 4px;
+ width: 27px;
+ height: 29px;
+ border: 1px solid;
+ border-radius: 3px;
+ cursor: pointer;
+}
+
+#theme-choices {
+ display: none;
+ position: absolute;
+ left: 0;
+ top: 28px;
+ border: 1px solid;
+ border-radius: 3px;
+ z-index: 1;
+ cursor: pointer;
+}
+
+#theme-choices > button {
+ border: none;
+ width: 100%;
+ padding: 4px;
+ text-align: center;
+ background: rgba(0,0,0,0);
+}
+
+#theme-choices > button:not(:first-child) {
+ border-top: 1px solid;
+}
+
/* Media Queries */
@media (max-width: 700px) {
@@ -1114,125 +1303,12 @@ span.since {
overflow: initial;
}
- #main > .line-numbers {
- margin-top: 0;
- }
-}
-
-@media print {
- nav.sub, .content .out-of-band, .collapse-toggle {
- display: none;
+ .theme-picker {
+ left: 10px;
+ top: 54px;
+ z-index: 1;
}
-}
-
-.information {
- position: absolute;
- left: -20px;
- margin-top: 7px;
- z-index: 1;
-}
-
-.tooltip {
- position: relative;
- display: inline-block;
- cursor: pointer;
-}
-
-.tooltip .tooltiptext {
- width: 120px;
- display: none;
- text-align: center;
- padding: 5px 3px;
- border-radius: 6px;
- margin-left: 5px;
- top: -5px;
- left: 105%;
- z-index: 10;
-}
-
-.tooltip:hover .tooltiptext {
- display: inline;
-}
-
-.tooltip .tooltiptext::after {
- content: " ";
- position: absolute;
- top: 50%;
- left: 11px;
- margin-top: -5px;
- border-width: 5px;
- border-style: solid;
-}
-
-.important-traits .tooltip .tooltiptext {
- border: 1px solid;
-}
-
-pre.rust {
- position: relative;
- tab-width: 4;
- -moz-tab-width: 4;
-}
-
-.search-failed {
- text-align: center;
- margin-top: 20px;
-}
-
-.search-failed > ul {
- text-align: left;
- max-width: 570px;
- margin-left: auto;
- margin-right: auto;
-}
-
-#titles {
- height: 35px;
-}
-
-#titles > div {
- float: left;
- width: 33.3%;
- text-align: center;
- font-size: 18px;
- cursor: pointer;
- border-top: 2px solid;
-}
-
-#titles > div:not(:last-child) {
- margin-right: 1px;
- width: calc(33.3% - 1px);
-}
-
-#titles > div > div.count {
- display: inline-block;
- font-size: 16px;
-}
-.important-traits {
- cursor: pointer;
- z-index: 2;
-}
-
-h4 > .important-traits {
- position: absolute;
- left: -44px;
- top: 2px;
-}
-
-#all-types {
- text-align: center;
- border: 1px solid;
- margin: 0 10px;
- margin-bottom: 10px;
- display: block;
- border-radius: 7px;
-}
-#all-types > p {
- margin: 5px 0;
-}
-
-@media (max-width: 700px) {
h4 > .important-traits {
position: absolute;
left: -22px;
@@ -1307,8 +1383,29 @@ h4 > .important-traits {
#all-types {
margin: 10px;
}
+
+ #sidebar-toggle {
+ top: 100px;
+ width: 30px;
+ font-size: 1.5rem;
+ text-align: center;
+ padding: 0;
+ }
+
+ #source-sidebar {
+ z-index: 11;
+ }
+
+ #main > .line-numbers {
+ margin-top: 0;
+ }
}
+@media print {
+ nav.sub, .content .out-of-band, .collapse-toggle {
+ display: none;
+ }
+}
@media (max-width: 416px) {
#titles {
@@ -1408,63 +1505,6 @@ kbd {
cursor: default;
}
-.theme-picker {
- position: absolute;
- left: 211px;
- top: 19px;
-}
-
-.theme-picker button {
- outline: none;
-}
-
-#settings-menu {
- position: absolute;
- right: 0;
- top: 10px;
- outline: none;
-}
-
-#theme-picker, #settings-menu {
- padding: 4px;
- width: 27px;
- height: 29px;
- border: 1px solid;
- border-radius: 3px;
- cursor: pointer;
-}
-
-#theme-choices {
- display: none;
- position: absolute;
- left: 0;
- top: 28px;
- border: 1px solid;
- border-radius: 3px;
- z-index: 1;
- cursor: pointer;
-}
-
-#theme-choices > button {
- border: none;
- width: 100%;
- padding: 4px;
- text-align: center;
- background: rgba(0,0,0,0);
-}
-
-#theme-choices > button:not(:first-child) {
- border-top: 1px solid;
-}
-
-@media (max-width: 700px) {
- .theme-picker {
- left: 10px;
- top: 54px;
- z-index: 1;
- }
-}
-
.hidden-by-impl-hider,
.hidden-by-usual-hider {
/* important because of conflicting rule for small screens */
@@ -1516,39 +1556,6 @@ kbd {
margin-bottom: 1em;
}
-#sidebar-toggle {
- position: fixed;
- top: 30px;
- left: 300px;
- z-index: 10;
- padding: 3px;
- border-top-right-radius: 3px;
- border-bottom-right-radius: 3px;
- cursor: pointer;
- font-weight: bold;
- transition: left .5s;
- font-size: 1.2em;
- border: 1px solid;
- border-left: 0;
-}
-#source-sidebar {
- position: fixed;
- top: 0;
- bottom: 0;
- left: 0;
- width: 300px;
- z-index: 1;
- overflow: auto;
- transition: left .5s;
- border-right: 1px solid;
-}
-#source-sidebar > .title {
- font-size: 1.5em;
- text-align: center;
- border-bottom: 1px solid;
- margin-bottom: 6px;
-}
-
div.children {
padding-left: 27px;
display: none;