about summary refs log tree commit diff
path: root/src/librustdoc/html
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-09-07 21:48:23 +0200
committerGitHub <noreply@github.com>2022-09-07 21:48:23 +0200
commiteae48c31cb79f74f68aab6e59e28be55a89092c3 (patch)
tree6ce01944550c14376418f2c501592a39b1e2f967 /src/librustdoc/html
parent41e1830a43bee92bc96d0c2170d94a25f124c98e (diff)
parent10fc2ff806cf11eb19c5376c7cdc929faf055b04 (diff)
downloadrust-eae48c31cb79f74f68aab6e59e28be55a89092c3.tar.gz
rust-eae48c31cb79f74f68aab6e59e28be55a89092c3.zip
Rollup merge of #101538 - notriddle:notriddle/content-methods-div, r=GuillaumeGomez
rustdoc: remove unused CSS `.content .methods > div`

This selector has its roots in these commits:

  * current version:

    `.content .methods > div:not(.notable-traits):not(.method)` from 9077d540da944c41678a7129e04e7fc5d7e38582

  * intermediate version:

    `.content .methods > div:not(.important-traits)` from d86621f69e827361e47bc6c4b2c7fd5319155227

  * original version:

    `.content .methods > div { margin-left: 40px; }` from 0a46933c4d81573e78ce16cd215ba155a3114fce

Based on the call stack, where [`class='methods'`] calls `trait_item` and [`trait_item`] calls [`document`], this div selector was probably intended to target docblock and stability tags.

In the current version of the code, neither of these can possibly be nested directly below the `class='methods'` wrapper, because the [current version of the `trait_item` function] always wraps them in a `<details>` tag if they exist. The only div tag that can possibly be nested directly below it now is the one with class `method`, which is explicitly excluded.

[`class='methods'`]: https://github.com/rust-lang/rust/blob/0a46933c4d81573e78ce16cd215ba155a3114fce/src/librustdoc/html/render.rs#L1811-L1842

[`trait_item`]: https://github.com/rust-lang/rust/blob/0a46933c4d81573e78ce16cd215ba155a3114fce/src/librustdoc/html/render.rs#L1807

[`document`]: https://github.com/rust-lang/rust/blob/0a46933c4d81573e78ce16cd215ba155a3114fce/src/librustdoc/html/render.rs#L1515-L1523

[current version of the `trait_item` function]: https://github.com/rust-lang/rust/blob/e7c7aa7288559f8e5ea7ce3543ff946b09783628/src/librustdoc/html/render/print_item.rs#L710
Diffstat (limited to 'src/librustdoc/html')
-rw-r--r--src/librustdoc/html/static/css/rustdoc.css5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css
index 9eae34e53c7..7665417cb5c 100644
--- a/src/librustdoc/html/static/css/rustdoc.css
+++ b/src/librustdoc/html/static/css/rustdoc.css
@@ -744,11 +744,6 @@ pre, .rustdoc.source .example-wrap {
 	font-size: 0.875rem;
 }
 
-.content .methods > div:not(.notable-traits):not(.method) {
-	margin-left: 40px;
-	margin-bottom: 15px;
-}
-
 .item-info {
 	display: block;
 }