Skip to content

Commit

Permalink
Rollup merge of #101737 - notriddle:notriddle/search-results-result-n…
Browse files Browse the repository at this point in the history
…ame-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.
  • Loading branch information
matthiaskrgr committed Sep 13, 2022
2 parents bc8ec5e + b963228 commit f80b38b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/librustdoc/html/static/css/rustdoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -986,12 +986,6 @@ so that we can apply CSS-filters to change the arrow color in themes */
padding-right: 1em;
}

.search-results .result-name > span {
display: inline-block;
margin: 0;
font-weight: normal;
}

.popover {
font-size: 1rem;
position: absolute;
Expand Down
3 changes: 3 additions & 0 deletions src/test/rustdoc-gui/search-result-display.goml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ size: (600, 100)
// when computed it's larger.
assert-css: (".search-results div.desc", {"width": "566px"})

// The result set is all on one line.
assert-css: (".search-results .result-name > span", {"display": "inline"})

// Check that the crate filter `<select>` is correctly handled when it goes to next line.
// To do so we need to update the length of one of its `<option>`.
size: (900, 900)
Expand Down

0 comments on commit f80b38b

Please sign in to comment.