Rollup merge of #104792 - notriddle:notriddle/crate-search-title-display, r=GuillaumeGomez

rustdoc: simplify `.search-results-title` CSS

By using `display: flex`, we still get the never-wrapping layout with `#crate-search-div` maxing out and truncating its text. The title itself winds up always filling its parent, but since `#crate-search` doesn't have `flex-grow` set, it won't fill available space.
This commit is contained in:
Matthias Krüger 2022-11-24 21:34:55 +01:00 committed by GitHub
commit ed2d9369f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -784,8 +784,7 @@ table,
margin-top: 0;
white-space: nowrap;
/* flex layout allows shrinking the <select> appropriately if it becomes too large */
display: inline-flex;
max-width: 100%;
display: flex;
/* make things look like in a line, despite the fact that we're using a layout
with boxes (i.e. from the flex layout) */
align-items: baseline;

View File

@ -22,7 +22,8 @@ size: (900, 900)
// First we check the current width, height and position.
assert-css: ("#crate-search", {"width": "223px"})
assert-css: (".search-results-title", {"height": "44px", "width": "336px"})
assert-css: (".search-results-title", {"height": "44px", "width": "640px"})
assert-css: ("#search", {"width": "640px"})
// Then we update the text of one of the `<option>`.
text: (