Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

search: Keep suggestion descriptions on one line.

Shubham Padia6f42ce1e07b0
diff --git a/web/styles/search.css b/web/styles/search.css
index d6a559b8346..fad6b5b6be4 100644
--- a/web/styles/search.css
+++ b/web/styles/search.css
@@ -401,8 +401,6 @@
.typeahead-menu .simplebar-content > li > a {
padding: 3px var(--search-left-padding);
- /* Override white-space: nowrap from zulip.css */
- white-space: normal;
.search_list_item {
max-width: 100%;
@@ -411,8 +409,19 @@
align-items: center;
}
+ .search_list_item > * {
+ /* Share the row equally, but never grow past the content
+ width. Space an item does not need goes to the others,
+ so the widest item is the one cut off when the row is
+ too narrow. */
+ flex: 1 1 0;
+ max-width: max-content;
+ }
+
.search_list_item .description {
margin: 2px 0;
+ overflow: hidden;
+ text-overflow: ellipsis;
}
.search_list_item .pill-container {
@@ -421,7 +430,6 @@
border: none;
cursor: pointer;
padding: 0;
- max-width: 100%;
}
.pill {
@@ -466,9 +474,4 @@
align-self: center;
}
}
-
- /* Break really long words (unlikely to happen). */
- .search_list_item span {
- overflow-wrap: anywhere;
- }
}