Skip to content

Commit b707eff

Browse files
committed
rustdoc: cut margin-top from first header in docblock
Fixes a regression caused by 8846c08, where a header's top margin used to be collapsed, but isn't any more.
1 parent 307dd93 commit b707eff

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,13 @@ h1, h2, h3, h4 {
138138
.docblock h3, .docblock h4, h5, h6 {
139139
margin: 15px 0 5px 0;
140140
}
141+
.docblock > h2:first-child,
142+
.docblock > h3:first-child,
143+
.docblock > h4:first-child,
144+
.docblock > h5:first-child,
145+
.docblock > h6:first-child {
146+
margin-top: 0;
147+
}
141148
h1.fqn {
142149
margin: 0;
143150
padding: 0;

0 commit comments

Comments
 (0)