Rollup merge of #33431 - GuillaumeGomez:issue-30416, r=steveklabnik
Update CSS for future rustdoc merge cc #33382 r? @steveklabnik cc @Manishearth cc @birkenfeld
This commit is contained in:
commit
c45d4816ca
3 changed files with 48 additions and 7 deletions
|
@ -2144,7 +2144,7 @@ fn render_stability_since_raw<'a>(w: &mut fmt::Formatter,
|
||||||
containing_ver: Option<&'a str>) -> fmt::Result {
|
containing_ver: Option<&'a str>) -> fmt::Result {
|
||||||
if let Some(v) = ver {
|
if let Some(v) = ver {
|
||||||
if containing_ver != ver && v.len() > 0 {
|
if containing_ver != ver && v.len() > 0 {
|
||||||
write!(w, "<span class=\"since\">{}</span>",
|
write!(w, "<div class=\"since\">{}</div>",
|
||||||
v)?
|
v)?
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2545,13 +2545,16 @@ fn render_impl(w: &mut fmt::Formatter, cx: &Context, i: &Impl, link: AssocItemLi
|
||||||
render_header: bool, outer_version: Option<&str>) -> fmt::Result {
|
render_header: bool, outer_version: Option<&str>) -> fmt::Result {
|
||||||
if render_header {
|
if render_header {
|
||||||
write!(w, "<h3 class='impl'><span class='in-band'><code>{}</code>", i.inner_impl())?;
|
write!(w, "<h3 class='impl'><span class='in-band'><code>{}</code>", i.inner_impl())?;
|
||||||
let since = i.impl_item.stability.as_ref().map(|s| &s.since[..]);
|
|
||||||
render_stability_since_raw(w, since, outer_version)?;
|
|
||||||
write!(w, "</span><span class='out-of-band'>")?;
|
write!(w, "</span><span class='out-of-band'>")?;
|
||||||
|
let since = i.impl_item.stability.as_ref().map(|s| &s.since[..]);
|
||||||
if let Some(l) = (Item { item: &i.impl_item, cx: cx }).href() {
|
if let Some(l) = (Item { item: &i.impl_item, cx: cx }).href() {
|
||||||
|
write!(w, "<div class='ghost'></div>")?;
|
||||||
|
render_stability_since_raw(w, since, outer_version)?;
|
||||||
write!(w, "<a id='src-{}' class='srclink' \
|
write!(w, "<a id='src-{}' class='srclink' \
|
||||||
href='{}' title='{}'>[src]</a>",
|
href='{}' title='{}'>[src]</a>",
|
||||||
i.impl_item.def_id.index.as_usize(), l, "goto source code")?;
|
i.impl_item.def_id.index.as_usize(), l, "goto source code")?;
|
||||||
|
} else {
|
||||||
|
render_stability_since_raw(w, since, outer_version)?;
|
||||||
}
|
}
|
||||||
write!(w, "</span>")?;
|
write!(w, "</span>")?;
|
||||||
write!(w, "</h3>\n")?;
|
write!(w, "</h3>\n")?;
|
||||||
|
|
|
@ -97,6 +97,7 @@ h1, h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):no
|
||||||
h1.fqn {
|
h1.fqn {
|
||||||
border-bottom: 1px dashed;
|
border-bottom: 1px dashed;
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod) {
|
h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod) {
|
||||||
border-bottom: 1px solid;
|
border-bottom: 1px solid;
|
||||||
|
@ -105,6 +106,7 @@ h3.impl, h3.method, h4.method, h3.type, h4.type {
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
h3.impl, h3.method, h3.type {
|
h3.impl, h3.method, h3.type {
|
||||||
margin-top: 15px;
|
margin-top: 15px;
|
||||||
|
@ -265,20 +267,39 @@ nav.sub {
|
||||||
|
|
||||||
.content .out-of-band {
|
.content .out-of-band {
|
||||||
font-size: 23px;
|
font-size: 23px;
|
||||||
width: 40%;
|
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
font-weight: normal;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
h3.impl > .out-of-band {
|
||||||
|
font-size: 21px;
|
||||||
|
}
|
||||||
|
|
||||||
|
h4 > code, h3 > code {
|
||||||
|
position: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
.in-band, code {
|
||||||
|
z-index: 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content .in-band {
|
.content .in-band {
|
||||||
width: 60%;
|
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#main { position: relative; }
|
||||||
|
#main > .since {
|
||||||
|
top: inherit;
|
||||||
|
font-family: "Fira Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
|
||||||
|
}
|
||||||
|
|
||||||
.content table {
|
.content table {
|
||||||
border-spacing: 0 5px;
|
border-spacing: 0 5px;
|
||||||
border-collapse: separate;
|
border-collapse: separate;
|
||||||
|
@ -498,11 +519,13 @@ em.stab p {
|
||||||
opacity: 0.65;
|
opacity: 0.65;
|
||||||
}
|
}
|
||||||
|
|
||||||
span.since {
|
.since {
|
||||||
float: right;
|
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
font-size: initial;
|
font-size: initial;
|
||||||
color: grey;
|
color: grey;
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.variants_table {
|
.variants_table {
|
||||||
|
@ -597,7 +620,19 @@ a.test-arrow {
|
||||||
color: #999;
|
color: #999;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.ghost {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ghost + .since {
|
||||||
|
position: initial;
|
||||||
|
display: table-cell;
|
||||||
|
}
|
||||||
|
|
||||||
|
.since + .srclink {
|
||||||
|
display: table-cell;
|
||||||
|
padding-left: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
/* Media Queries */
|
/* Media Queries */
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,9 @@ h1.fqn {
|
||||||
h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod) {
|
h2, h3:not(.impl):not(.method):not(.type):not(.tymethod), h4:not(.method):not(.type):not(.tymethod) {
|
||||||
border-bottom-color: #DDDDDD;
|
border-bottom-color: #DDDDDD;
|
||||||
}
|
}
|
||||||
|
.in-band, code {
|
||||||
|
background-color: white;
|
||||||
|
}
|
||||||
|
|
||||||
.docblock code {
|
.docblock code {
|
||||||
background-color: #F5F5F5;
|
background-color: #F5F5F5;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue