discourse/app/assets/stylesheets/common/select-kit/multi-select.scss

147 lines
2.8 KiB
SCSS

.select-kit {
&.multi-select {
width: 300px;
background: var(--secondary);
border-radius: 0;
.select-kit-row {
margin: 5px;
min-height: 1px;
padding: 5px;
border-radius: 0;
}
.select-kit-filter {
border: 0;
flex: 1 0 0px;
margin: 1px;
}
.multi-select-header {
background: var(--secondary);
border: 1px solid var(--primary-medium);
&.is-focused,
&:focus {
@include default-focus;
}
}
&.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);
}
}
}
&.is-expanded {
.select-kit-wrapper {
display: block;
}
.multi-select-header {
border-radius: 0;
@include default-focus;
}
.select-kit-body {
border-radius: 0;
box-shadow: shadow("dropdown");
&.empty-body {
visibility: hidden;
}
}
}
.choices {
margin: 0;
padding: 0 0 2px 0;
box-sizing: border-box;
display: block;
width: 100%;
.choice {
display: inline-flex;
box-sizing: border-box;
align-items: center;
justify-content: space-between;
margin: 2px 0 0px 3px;
padding: 0;
float: left;
height: 30px;
&.input-wrapper {
min-width: 120px;
}
}
.multi-select-filter .filter-input {
padding-left: 5px;
}
.selected-color {
.selected-color-wrapper {
display: flex;
flex: 1 0 0px;
flex-direction: column;
}
.color-preview {
height: 5px;
margin: 0 2px 2px 0px;
display: flex;
width: 100%;
}
}
.selected-category {
.body {
display: flex;
align-items: center;
}
.badge-wrapper {
&.bullet {
margin-right: 2.5px;
}
padding: 2px 4px;
line-height: $line-height-medium;
display: flex;
flex: 1 0 0px;
align-items: center;
}
}
.selected-name {
background: var(--primary-low);
padding: 0.25em;
flex: 1;
align-items: center;
display: flex;
justify-content: space-between;
max-width: calc(100% - 5px);
.name {
@include ellipsis;
}
.d-icon {
color: var(--primary-low-mid);
vertical-align: middle;
&:last-child {
margin-left: 0.5em;
}
}
&:hover .d-icon:last-child {
color: var(--danger);
}
}
}
}
}