Skip to content

Commit eae48c3

Browse files
authored
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 9077d54 * intermediate version: `.content .methods > div:not(.important-traits)` from d86621f * original version: `.content .methods > div { margin-left: 40px; }` from 0a46933 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
2 parents 41e1830 + 10fc2ff commit eae48c3

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

src/librustdoc/html/static/css/rustdoc.css

-5
Original file line numberDiff line numberDiff line change
@@ -744,11 +744,6 @@ pre, .rustdoc.source .example-wrap {
744744
font-size: 0.875rem;
745745
}
746746

747-
.content .methods > div:not(.notable-traits):not(.method) {
748-
margin-left: 40px;
749-
margin-bottom: 15px;
750-
}
751-
752747
.item-info {
753748
display: block;
754749
}

0 commit comments

Comments
 (0)