Skip to content

Commit b963228

Browse files
committed
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.
1 parent 52e003a commit b963228

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -987,12 +987,6 @@ so that we can apply CSS-filters to change the arrow color in themes */
987987
padding-right: 1em;
988988
}
989989

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

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

Lines changed: 3 additions & 0 deletions
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)