Skip to content

Commit 570b999

Browse files
authored
Rollup merge of rust-lang#90036 - jsha:less-rule, r=GuillaumeGomez
Remove border-bottom from most docblocks. Headings in the top-doc docblock still get a border-bottom due to a rule that covers all h2, h3, and h4. Method docblocks are generally h5, and so don't get a border-bottom anymore. This fixes a problem where a sub-sub-heading within a method would have a line that went all the way across the page, creating a division that made that sub-sub-heading look much more important than it really is. Fixes rust-lang#90033 Demo at https://jacob.hoffman-andrews.com/rust/less-rule/std/string/struct.String.html r? ``@GuillaumeGomez``
2 parents d8b3764 + e399343 commit 570b999

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

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

+8-5
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,14 @@ h3 {
129129
}
130130
h1, h2, h3, h4, h5, h6 {
131131
font-weight: 500;
132+
}
133+
h1, h2, h3, h4 {
132134
margin: 20px 0 15px 0;
133135
padding-bottom: 6px;
134136
}
137+
h5, h6 {
138+
margin: 15px 0 5px 0;
139+
}
135140
h1.fqn {
136141
display: flex;
137142
border-bottom: 1px dashed;
@@ -505,14 +510,12 @@ nav.sub {
505510
white-space: pre-wrap;
506511
}
507512

508-
.docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5, .docblock h6 {
509-
border-bottom: 1px solid;
510-
}
511-
512513
.top-doc .docblock h2 { font-size: 1.3em; }
513514
.top-doc .docblock h3 { font-size: 1.15em; }
514515
.top-doc .docblock h4,
515-
.top-doc .docblock h5,
516+
.top-doc .docblock h5 {
517+
font-size: 1.1em;
518+
}
516519
.top-doc .docblock h6 {
517520
font-size: 1em;
518521
}

0 commit comments

Comments
 (0)