discourse/app/assets/stylesheets/common/select-kit/multi-select.scss
Joffrey JAFFEUX cb59681d86
DEV: select-kit third major update with focus on accessibility (#13303)
Major changes included:
- better support for screen readers
- trapping focus in modals
- better tabbing order in composer
- alerts on no content found/number of items found
- better autofocus in modals
- mini-tag-chooser is now a multi-select component
- each multi-select-component will now display selection on one row
2021-08-23 10:44:19 +02:00

83 lines
1.7 KiB
SCSS

.select-kit {
&.multi-select {
width: 300px;
background: var(--secondary);
border-radius: 0;
.select-kit-filter {
& + .selected-content,
& + .select-kit-collection {
border-top: 1px solid var(--primary-low);
}
}
.select-kit-row {
min-height: 1px;
border-radius: 0;
}
&.is-disabled {
.multi-select-header {
background: var(--primary-low);
border-color: var(--primary-low-mid);
color: var(--primary-medium);
.d-icon {
color: var(--primary-medium);
}
}
}
.selected-content {
display: flex;
width: 100%;
flex-wrap: wrap;
padding: 0;
justify-content: flex-start;
box-sizing: border-box;
border-bottom: 1px solid var(--primary-low);
padding: 0.25em 0.25em 0 0.25em;
.selected-choice {
margin: 0 0.25em 0.25em 0;
font-size: var(--font-down-1);
&.selected-choice-color {
border-bottom: 2px solid transparent;
}
}
}
.multi-select-header {
background: var(--secondary);
border: 1px solid var(--primary-medium);
padding: 0 0.25em 0 0.5em;
font-weight: 500;
font-size: var(--font-0);
box-sizing: border-box;
overflow: hidden;
.formated-selection {
margin: 0;
border: 0;
padding: 0;
outline: none;
box-shadow: none;
cursor: pointer;
@include ellipsis;
}
}
.multi-select-header:focus {
border-radius: 0;
@include default-focus;
}
&.is-expanded {
.multi-select-header {
border-radius: 0;
@include default-focus;
}
}
}
}