Skip to content

Commit f80b38b

Browse files
authored
Rollup merge of #101737 - notriddle:notriddle/search-results-result-name-span, r=GuillaumeGomez
rustdoc: remove no-op CSS `.search-results .result-name > span` The rule `display: inline-block` was added in 5afa52b. The `margin: 0` and `font-weight: normal` were added in c01bd56. Both seem to have been added to override class-based rules that were targetted at method sections. See <https://github.com/rust-lang/rust/blob/c01bd560e2f87a9a960ed071213edd70f73171a8/src/librustdoc/html/static/rustdoc.css#L140-L148> for an example. The selectors that these were meant to override were changed in a8318e4 and 76a3b60 to be more specific, so they no longer need to be overridden.
2 parents bc8ec5e + b963228 commit f80b38b

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

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

-6
Original file line numberDiff line numberDiff line change
@@ -986,12 +986,6 @@ so that we can apply CSS-filters to change the arrow color in themes */
986986
padding-right: 1em;
987987
}
988988

989-
.search-results .result-name > span {
990-
display: inline-block;
991-
margin: 0;
992-
font-weight: normal;
993-
}
994-
995989
.popover {
996990
font-size: 1rem;
997991
position: absolute;

src/test/rustdoc-gui/search-result-display.goml

+3
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ size: (600, 100)
1313
// when computed it's larger.
1414
assert-css: (".search-results div.desc", {"width": "566px"})
1515

16+
// The result set is all on one line.
17+
assert-css: (".search-results .result-name > span", {"display": "inline"})
18+
1619
// Check that the crate filter `<select>` is correctly handled when it goes to next line.
1720
// To do so we need to update the length of one of its `<option>`.
1821
size: (900, 900)

0 commit comments

Comments
 (0)