Skip to content

Commit 04deb1d

Browse files
committed
fix: text overflow improvements
1 parent f675624 commit 04deb1d

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

packages/pluggableWidgets/combobox-web/src/ui/Combobox.scss

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ $cb-skeleton-light: rgba(194, 194, 194, 0.2);
1818
$cb-skeleton-dark: #d2d2d2;
1919

2020
.widget-combobox {
21+
min-width: 0;
2122
flex-grow: 1;
2223
position: relative;
2324
transition: color 150ms ease 0s;
@@ -292,12 +293,13 @@ $cb-skeleton-dark: #d2d2d2;
292293

293294
&-selected {
294295
&-items {
296+
min-width: 0; // allow to wrap, otherwise it grows out of parent
295297
display: flex;
296298
flex-grow: 1;
297-
flex-wrap: wrap;
298299
position: relative;
299300

300301
&.widget-combobox-boxes {
302+
flex-wrap: wrap;
301303
margin: -2px 0;
302304
.widget-combobox-input {
303305
&-nofilter {
@@ -306,10 +308,17 @@ $cb-skeleton-dark: #d2d2d2;
306308
}
307309
}
308310

311+
// prevent textbox and text from wrapping
312+
// design requires input-like representation
313+
&.widget-combobox-text {
314+
flex-wrap: nowrap;
315+
}
316+
309317
input:placeholder-shown,
310318
input:not(:focus) {
311319
& + .widget-combobox-placeholder-text {
312-
display: flex;
320+
display: initial;
321+
text-overflow: ellipsis;
313322
align-items: center;
314323
}
315324
}

0 commit comments

Comments
 (0)