about summary refs log tree commit diff
path: root/src/librustdoc/html/static/css/rustdoc.css
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-07-10 11:52:15 +0200
committerGitHub <noreply@github.com>2022-07-10 11:52:15 +0200
commitca51d325e8656d8bba1811f7bea6b2d82d87fb1c (patch)
treeaa43b53ce1562e11ef1f640de92bddd5269bd29c /src/librustdoc/html/static/css/rustdoc.css
parent0dd5c75efffa3c5178fa32d3fbd99f682faa4e33 (diff)
parent9d5e6e2fc3709d5491af7e199a4d18c11170cffd (diff)
downloadrust-ca51d325e8656d8bba1811f7bea6b2d82d87fb1c.tar.gz
rust-ca51d325e8656d8bba1811f7bea6b2d82d87fb1c.zip
Rollup merge of #99086 - GuillaumeGomez:search-result-crate-filter-dropdown, r=notriddle
Fix display of search result crate filter dropdown

In case a crate name is too long, the `<select>` completely overflows its parent. Another problem is that there is left margin on the `select` which break the alignment. You can see both issues here:

![Screenshot from 2022-07-09 15-31-12](https://user-images.githubusercontent.com/3050060/178108959-0eb5af19-ec60-4d34-a2fd-c27147683c78.png)

And with the fix:

![Screenshot from 2022-07-09 15-33-37](https://user-images.githubusercontent.com/3050060/178108980-71030a92-84ee-4ee5-98e3-f97d03a6fbaf.png)

cc `@jsha`
r? `@notriddle`
Diffstat (limited to 'src/librustdoc/html/static/css/rustdoc.css')
-rw-r--r--src/librustdoc/html/static/css/rustdoc.css3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/librustdoc/html/static/css/rustdoc.css b/src/librustdoc/html/static/css/rustdoc.css
index 294b0a1e9c9..5c7b56ec140 100644
--- a/src/librustdoc/html/static/css/rustdoc.css
+++ b/src/librustdoc/html/static/css/rustdoc.css
@@ -924,7 +924,6 @@ table,
 #crate-search {
 	min-width: 115px;
 	margin-top: 5px;
-	margin-left: 0.25em;
 	padding-left: 0.3125em;
 	padding-right: 23px;
 	border: 1px solid;
@@ -941,6 +940,8 @@ table,
 	background-size: 20px;
 	background-position: calc(100% - 1px) 56%;
 	background-image: /* AUTOREPLACE: */url("down-arrow.svg");
+	max-width: 100%;
+	text-overflow: ellipsis;
 }
 .search-container {
 	margin-top: 4px;