diff options
| author | bors <bors@rust-lang.org> | 2024-10-24 10:16:52 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-10-24 10:16:52 +0000 |
| commit | 5ae4d75effa366176dd75cd0d5662da26385cfc5 (patch) | |
| tree | 4c1befc815a8fa661455d48eb5a26e69c9ad1f5a /src | |
| parent | 8aca4bab080b2c81065645fc070acca7a060f8a3 (diff) | |
| parent | 7c22f47e22335e44b14dcfb3dfd61a867f8f34ed (diff) | |
| download | rust-5ae4d75effa366176dd75cd0d5662da26385cfc5.tar.gz rust-5ae4d75effa366176dd75cd0d5662da26385cfc5.zip | |
Auto merge of #132099 - matthiaskrgr:rollup-myi94r8, r=matthiaskrgr
Rollup of 5 pull requests Successful merges: - #129248 (Taking a raw ref (`&raw (const|mut)`) of a deref of pointer (`*ptr`) is always safe) - #131906 (rustdoc: adjust spacing and typography in header) - #132084 (Consider param-env candidates even if they have errors) - #132096 (Replace an FTP link in comments with an equivalent HTTPS link) - #132098 (rustc_feature::Features: explain what that 'Option<Symbol>' is about) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustdoc/html/render/mod.rs | 4 | ||||
| -rw-r--r-- | src/librustdoc/html/static/css/rustdoc.css | 10 | ||||
| -rw-r--r-- | src/librustdoc/html/templates/print_item.html | 2 |
3 files changed, 11 insertions, 5 deletions
diff --git a/src/librustdoc/html/render/mod.rs b/src/librustdoc/html/render/mod.rs index 399730a01c8..ce96d1d0a95 100644 --- a/src/librustdoc/html/render/mod.rs +++ b/src/librustdoc/html/render/mod.rs @@ -2010,9 +2010,9 @@ fn render_rightside(w: &mut Buffer, cx: &Context<'_>, item: &clean::Item, render ); if let Some(link) = src_href { if has_stability { - write!(rightside, " · <a class=\"src\" href=\"{link}\">source</a>") + write!(rightside, " · <a class=\"src\" href=\"{link}\">Source</a>") } else { - write!(rightside, "<a class=\"src rightside\" href=\"{link}\">source</a>") + write!(rightside, "<a class=\"src rightside\" href=\"{link}\">Source</a>") } } if has_stability && has_src_ref { diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css index 2c17fd54006..ae4d55e93ac 100644 --- a/src/librustdoc/html/static/css/rustdoc.css +++ b/src/librustdoc/html/static/css/rustdoc.css @@ -185,7 +185,7 @@ h1, h2, h3, h4 { grid-template-columns: minmax(105px, 1fr) minmax(0, max-content); grid-template-rows: minmax(25px, min-content) min-content min-content; padding-bottom: 6px; - margin-bottom: 11px; + margin-bottom: 15px; } .rustdoc-breadcrumbs { grid-area: main-heading-breadcrumbs; @@ -1004,6 +1004,7 @@ nav.sub { display: flex; height: 34px; flex-grow: 1; + margin-bottom: 4px; } .src nav.sub { margin: 0 0 -10px 0; @@ -2253,7 +2254,12 @@ in src-script.js and main.js /* We don't display this button on mobile devices. */ #copy-path { - display: none; + /* display: none; avoided as a layout hack. + When there's one line, we get an effective line-height of 34px, + because that's how big the image is, but if the header wraps, + they're packed more tightly than that. */ + width: 0; + visibility: hidden; } /* Text label takes up too much space at this size. */ diff --git a/src/librustdoc/html/templates/print_item.html b/src/librustdoc/html/templates/print_item.html index f60720b67c6..9fd575b2751 100644 --- a/src/librustdoc/html/templates/print_item.html +++ b/src/librustdoc/html/templates/print_item.html @@ -26,7 +26,7 @@ {% match src_href %} {% when Some with (href) %} {% if !stability_since_raw.is_empty() +%} · {%+ endif %} - <a class="src" href="{{href|safe}}">source</a> {#+ #} + <a class="src" href="{{href|safe}}">Source</a> {#+ #} {% else %} {% endmatch %} </span> {# #} |
