diff options
| author | Guillaume Gomez <guillaume1.gomez@gmail.com> | 2021-11-24 22:56:37 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-24 22:56:37 +0100 |
| commit | 9390b50ef4dc989be4f2bad5dd958c78b0d7fc7c (patch) | |
| tree | cb788ed4c42ff9264280f666e51b2455f5feed19 /src/librustdoc | |
| parent | a6a1d7ca2936ddb33dbaad69ae3a8a47b9208498 (diff) | |
| parent | e6ab982d462994dc21a81561ae03bac476431b96 (diff) | |
Rollup merge of #91075 - jsha:chill-item-info, r=GuillaumeGomez
Reduce prominence of item-infos Fixes #59853 - Remove border. - Reduce size of emoji slightly. - Remove details disclosure for unstable reason. This was inconsistent with our other details disclosures, and the detail revealed was usually better explained by clicking on the issue link. Demo: https://rustdoc.crud.net/jsha/chill-item-info/std/mem/union.MaybeUninit.html#method.slice_assume_init_ref Compare vs: https://doc.rust-lang.org/nightly/std/mem/union.MaybeUninit.html#method.slice_assume_init_ref <img src="https://user-images.githubusercontent.com/220205/142717815-09828c9e-6ff4-445a-8ccc-31e028fd4985.png" width=700>
Diffstat (limited to 'src/librustdoc')
| -rw-r--r-- | src/librustdoc/html/render/mod.rs | 18 | ||||
| -rw-r--r-- | src/librustdoc/html/static/css/rustdoc.css | 4 |
2 files changed, 2 insertions, 20 deletions
diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs index ffd09663f82..24baca285c6 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -682,7 +682,7 @@ fn short_item_info( // Render unstable items. But don't render "rustc_private" crates (internal compiler crates). // Those crates are permanently unstable so it makes no sense to render "unstable" everywhere. - if let Some((StabilityLevel::Unstable { reason, issue, .. }, feature)) = item + if let Some((StabilityLevel::Unstable { reason: _, issue, .. }, feature)) = item .stability(cx.tcx()) .as_ref() .filter(|stab| stab.feature != sym::rustc_private) @@ -702,22 +702,6 @@ fn short_item_info( message.push_str(&format!(" ({})", feature)); - if let Some(unstable_reason) = reason { - let mut ids = cx.id_map.borrow_mut(); - message = format!( - "<details><summary>{}</summary>{}</details>", - message, - MarkdownHtml( - &unstable_reason.as_str(), - &mut ids, - error_codes, - cx.shared.edition(), - &cx.shared.playground, - ) - .into_string() - ); - } - extra_info.push(format!("<div class=\"stab unstable\">{}</div>", message)); } diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index 27f9c183b8e..0f3eb2ca07d 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -964,8 +964,6 @@ body.blur > :not(#help) { display: table; } .stab { - border-width: 1px; - border-style: solid; padding: 3px; margin-bottom: 5px; font-size: 90%; @@ -976,7 +974,7 @@ body.blur > :not(#help) { } .stab .emoji { - font-size: 1.5em; + font-size: 1.2em; } /* Black one-pixel outline around emoji shapes */ |
