Et2Select: Turn off line wrapping in options

This commit is contained in:
nathan 2024-07-11 09:57:13 -06:00
parent f2710b4749
commit f4bb3d5709

View File

@ -116,11 +116,14 @@ export class Et2Select extends Et2WithSearchMixin(Et2WidgetWithSelect)
vertical-align: middle;
}
/* Get rid of padding before/after options */
sl-menu::part(base) {
padding: 0px;
/* No wrapping */
sl-option::part(base) {
white-space: nowrap;
}
/* No horizontal scrollbar, even if options are long */
.dropdown__panel {
overflow-x: clip;
}
@ -130,6 +133,7 @@ export class Et2Select extends Et2WithSearchMixin(Et2WidgetWithSelect)
::part(tags) {
max-width: 100%;
}
.select__label {
display: block;
text-overflow: ellipsis;
@ -215,6 +219,7 @@ export class Et2Select extends Et2WithSearchMixin(Et2WidgetWithSelect)
display: flex;
flex-wrap: wrap;
}
::part(listbox) {
z-index: 1;
background: var(--sl-input-background-color);
@ -236,6 +241,7 @@ export class Et2Select extends Et2WithSearchMixin(Et2WidgetWithSelect)
max-height: 8em;
overflow-y: auto;
}
:host([readonly])::part(combobox) {
background: none;
opacity: 1;