Rollup merge of #54869 - GuillaumeGomez:fix-mobile-docs, r=QuietMisdreavus

Fix mobile docs

Fixes #54836.

<img width="1440" alt="screen shot 2018-10-06 at 18 53 19" src="https://user-images.githubusercontent.com/3050060/46573683-1b4cd700-c999-11e8-9e6b-86a23b332e22.png">

r? @QuietMisdreavus
This commit is contained in:
kennytm 2018-10-12 22:04:05 +08:00 committed by GitHub
commit 8d85b893d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 32 additions and 20 deletions

View file

@ -9,6 +9,6 @@ path = "lib.rs"
[dependencies]
pulldown-cmark = { version = "0.1.2", default-features = false }
minifier = "0.0.19"
minifier = "0.0.20"
tempfile = "3"
parking_lot = "0.6.4"

View file

@ -4098,12 +4098,13 @@ impl<'a> fmt::Display for Sidebar<'a> {
</div>",
version)?;
}
write!(fmt, "<a id='all-types' href='all.html'><p>See all {}'s items</p></a>",
it.name.as_ref().expect("crates always have a name"))?;
}
write!(fmt, "<div class=\"sidebar-elems\">")?;
if it.is_crate() {
write!(fmt, "<a id='all-types' href='all.html'><p>See all {}'s items</p></a>",
it.name.as_ref().expect("crates always have a name"))?;
}
match it.inner {
clean::StructItem(ref s) => sidebar_struct(fmt, it, s)?,
clean::TraitItem(ref t) => sidebar_trait(fmt, it, t)?,

View file

@ -908,10 +908,9 @@ span.since {
padding-top: 0px;
}
.sidebar {
body > .sidebar {
height: 45px;
min-height: 40px;
width: calc(100% + 30px);
margin: 0;
margin-left: -15px;
padding: 0 15px;
@ -1013,6 +1012,10 @@ span.since {
.anchor {
display: none !important;
}
h1.fqn {
overflow: initial;
}
}
@media print {
@ -1112,6 +1115,18 @@ h4 > .important-traits {
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;
@ -1135,6 +1150,9 @@ h4 > .important-traits {
background-color: rgba(0,0,0,0);
height: 100%;
}
.sidebar {
width: calc(100% + 30px);
}
.show-it {
display: block;
@ -1180,6 +1198,10 @@ h4 > .important-traits {
.impl > .collapse-toggle {
left: -10px;
}
#all-types {
margin: 10px;
}
}
@ -1383,17 +1405,6 @@ kbd {
#main > ul > li {
list-style: none;
}
#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;
}
.non-exhaustive {
margin-bottom: 1em;