Skip to content

Commit 128733d

Browse files
authored
Rollup merge of #102034 - notriddle:notriddle/border-bottom, r=GuillaumeGomez
rustdoc: remove no-op CSS `h1-6 { border-bottom-color }` For this rule to have an actual effect, the border-bottom width needs specified, elsewhere, without also specifying the color. This doesn't happen. Ever since 88b137d, every spot where headers get a border assigned to them also assigns the color. Preview: https://notriddle.com/notriddle-rustdoc-test/border-bottom/rustc_monomorphize/collector/index.html
2 parents 1b54ee3 + 17259c3 commit 128733d

File tree

3 files changed

+13
-20
lines changed

3 files changed

+13
-20
lines changed

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

-7
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,6 @@ h1, h2, h3, h4 {
141141
h1.fqn {
142142
margin: 0;
143143
padding: 0;
144-
border-bottom-color: var(--headings-border-bottom-color);
145-
}
146-
h2, h3, h4 {
147-
border-bottom-color: var(--headings-border-bottom-color);
148144
}
149145
.main-heading {
150146
display: flex;
@@ -659,9 +655,6 @@ h2.location a {
659655

660656
.docblock h5 { font-size: 1rem; }
661657
.docblock h6 { font-size: 0.875rem; }
662-
.docblock h1, .docblock h2, .docblock h3, .docblock h4, .docblock h5, .docblock h6 {
663-
border-bottom-color: var(--headings-border-bottom-color);
664-
}
665658

666659
.docblock {
667660
margin-left: 24px;

src/test/rustdoc-gui/docblock-details.goml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ assert-css: (
1414
// We now check that the `<summary>` doesn't have a bottom border and has the correct display.
1515
assert-css: (
1616
".top-doc .docblock summary h4",
17-
{"border-bottom": "0px none rgb(210, 210, 210)"},
17+
{"border-bottom-width": "0px"},
1818
)
1919
// This allows to ensure that summary is on one line only!
2020
assert-property: (".top-doc .docblock summary h4", {"offsetHeight": "33"})

src/test/rustdoc-gui/headings.goml

+12-12
Original file line numberDiff line numberDiff line change
@@ -168,19 +168,19 @@ assert-css: (
168168
)
169169
assert-css: (
170170
".top-doc .docblock h5",
171-
{"color": "rgb(0, 0, 0)", "border-bottom": "0px none rgb(221, 221, 221)"},
171+
{"color": "rgb(0, 0, 0)", "border-bottom-width": "0px"},
172172
)
173173
assert-css: (
174174
"#implementations-list .docblock h4",
175-
{"color": "rgb(0, 0, 0)", "border-bottom": "0px none rgb(221, 221, 221)"},
175+
{"color": "rgb(0, 0, 0)", "border-bottom-width": "0px"},
176176
)
177177
assert-css: (
178178
"#implementations-list .docblock h5",
179-
{"color": "rgb(0, 0, 0)", "border-bottom": "0px none rgb(221, 221, 221)"},
179+
{"color": "rgb(0, 0, 0)", "border-bottom-width": "0px"},
180180
)
181181
assert-css: (
182182
"#implementations-list .docblock h6",
183-
{"color": "rgb(0, 0, 0)", "border-bottom": "0px none rgb(221, 221, 221)"},
183+
{"color": "rgb(0, 0, 0)", "border-bottom-width": "0px"},
184184
)
185185

186186
local-storage: {"rustdoc-theme": "dark"}
@@ -199,19 +199,19 @@ assert-css: (
199199
)
200200
assert-css: (
201201
".top-doc .docblock h5",
202-
{"color": "rgb(221, 221, 221)", "border-bottom": "0px none rgb(210, 210, 210)"},
202+
{"color": "rgb(221, 221, 221)", "border-bottom-width": "0px"},
203203
)
204204
assert-css: (
205205
"#implementations-list .docblock h4",
206-
{"color": "rgb(221, 221, 221)", "border-bottom": "0px none rgb(210, 210, 210)"},
206+
{"color": "rgb(221, 221, 221)", "border-bottom-width": "0px"},
207207
)
208208
assert-css: (
209209
"#implementations-list .docblock h5",
210-
{"color": "rgb(221, 221, 221)", "border-bottom": "0px none rgb(210, 210, 210)"},
210+
{"color": "rgb(221, 221, 221)", "border-bottom-width": "0px"},
211211
)
212212
assert-css: (
213213
"#implementations-list .docblock h6",
214-
{"color": "rgb(221, 221, 221)", "border-bottom": "0px none rgb(210, 210, 210)"},
214+
{"color": "rgb(221, 221, 221)", "border-bottom-width": "0px"},
215215
)
216216

217217
local-storage: {"rustdoc-theme": "ayu"}
@@ -230,19 +230,19 @@ assert-css: (
230230
)
231231
assert-css: (
232232
".top-doc .docblock h5",
233-
{"color": "rgb(197, 197, 197)", "border-bottom": "0px none rgb(92, 103, 115)"},
233+
{"color": "rgb(197, 197, 197)", "border-bottom-width": "0px"},
234234
)
235235
assert-css: (
236236
"#implementations-list .docblock h4",
237-
{"color": "rgb(255, 255, 255)", "border-bottom": "0px none rgb(92, 103, 115)"},
237+
{"color": "rgb(255, 255, 255)", "border-bottom-width": "0px"},
238238
)
239239
assert-css: (
240240
"#implementations-list .docblock h5",
241-
{"color": "rgb(197, 197, 197)", "border-bottom": "0px none rgb(92, 103, 115)"},
241+
{"color": "rgb(197, 197, 197)", "border-bottom-width": "0px"},
242242
)
243243
assert-css: (
244244
"#implementations-list .docblock h6",
245-
{"color": "rgb(197, 197, 197)", "border-bottom": "0px none rgb(92, 103, 115)"},
245+
{"color": "rgb(197, 197, 197)", "border-bottom-width": "0px"},
246246
)
247247

248248
local-storage: {"rustdoc-theme": "light"}

0 commit comments

Comments
 (0)