Skip to content

Commit

Permalink
rustdoc: add method spacing to trait methods
Browse files Browse the repository at this point in the history
More cleanup for 8846c08, this time in trait
layouts when things are collapsed.
  • Loading branch information
notriddle committed Sep 29, 2022
1 parent ce7f0f1 commit d412bdc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/librustdoc/html/render/print_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -716,7 +716,7 @@ fn item_trait(w: &mut Buffer, cx: &mut Context<'_>, it: &clean::Item, t: &clean:
document(&mut content, cx, m, Some(t), HeadingOffset::H5);
let toggled = !content.is_empty();
if toggled {
write!(w, "<details class=\"rustdoc-toggle\" open><summary>");
write!(w, "<details class=\"rustdoc-toggle method-toggle\" open><summary>");
}
write!(w, "<div id=\"{}\" class=\"method has-srclink\">", id);
render_rightside(w, cx, m, t, RenderMode::Normal);
Expand Down
3 changes: 2 additions & 1 deletion src/librustdoc/html/static/css/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -2011,7 +2011,8 @@ in storage.js plus the media query with (min-width: 701px)

.method-toggle summary,
.implementors-toggle summary,
.impl {
.impl,
#implementors-list > .docblock {
margin-bottom: 0.75em;
}

Expand Down

0 comments on commit d412bdc

Please sign in to comment.