Skip to content

Commit 985dd44

Browse files
committed
Make dropdowns with long options degrade more gracefully
If not enough space was dedicated to a dropdown, it would previously make option text overlap. With this patch, each option can potentially span multiple lines. This is weird, but it's a better degradation than making option text overlap. Signed-off-by: Slavi Pantaleev <slavi@devture.com>
1 parent 3bf0409 commit 985dd44

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/skins/vector/css/matrix-react-sdk/views/elements/_Dropdown.scss

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ limitations under the License.
5656
left: 10px;
5757
}
5858

59+
.mx_Dropdown_input > .mx_Dropdown_option {
60+
overflow: hidden;
61+
text-overflow: ellipsis;
62+
white-space: nowrap;
63+
}
64+
5965
.mx_Dropdown.left_aligned .mx_Dropdown_input > .mx_Dropdown_option {
6066
padding-left: 25px;
6167
}
@@ -104,6 +110,11 @@ input.mx_Dropdown_option, input.mx_Dropdown_option:focus {
104110
overflow-y: auto;
105111
}
106112

113+
.mx_Dropdown_menu .mx_Dropdown_option {
114+
height: auto;
115+
min-height: 35px;
116+
}
117+
107118
.mx_Dropdown_menu .mx_Dropdown_option_highlight {
108119
background-color: $focus-bg-color;
109120
}

0 commit comments

Comments
 (0)