Skip to content

Commit f90b9c4

Browse files
authored
Rollup merge of rust-lang#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.
2 parents 7e70129 + 2185f49 commit f90b9c4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

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

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

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ size: (900, 900)
2222

2323
// First we check the current width, height and position.
2424
assert-css: ("#crate-search", {"width": "223px"})
25-
assert-css: (".search-results-title", {"height": "44px", "width": "336px"})
25+
assert-css: (".search-results-title", {"height": "44px", "width": "640px"})
26+
assert-css: ("#search", {"width": "640px"})
2627

2728
// Then we update the text of one of the `<option>`.
2829
text: (

0 commit comments

Comments
 (0)