Rollup merge of #60383 - GuillaumeGomez:fix-position-source-code-files-toggle, r=Manishearth

Fix position source code files toggle

Fixes #60381.

The second commit is a big cleanup of the media queries.

r? @rust-lang/rustdoc

cc @Manishearth

screenshot of the fix:

<img width="501" alt="Screenshot 2019-04-29 at 23 42 56" src="https://user-images.githubusercontent.com/3050060/56929111-112b2b00-6ad9-11e9-9a23-e0a8e3641395.png">
This commit is contained in:
Mazdak Farrokhzad 2019-05-20 23:02:52 +02:00 committed by GitHub
commit daf8aca0e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 214 additions and 207 deletions

View File

@ -1011,6 +1011,195 @@ h3 > .collapse-toggle, h4 > .collapse-toggle {
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) {
@ -1137,125 +1326,12 @@ h3 > .collapse-toggle, h4 > .collapse-toggle {
overflow: initial;
}
#main > .line-numbers {
margin-top: 0;
.theme-picker {
left: 10px;
top: 54px;
z-index: 1;
}
}
@media print {
nav.sub, .content .out-of-band, .collapse-toggle {
display: none;
}
}
.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;
@ -1330,8 +1406,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 {
@ -1431,63 +1528,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 */
@ -1539,39 +1579,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;