open-nomad/ui/app/styles/components/dropdown.scss
Michael Lange 6a0f5b5a4d
Fixes a few minor issues with the multiselect dropdown
1. Label no longer bleeds into the downward arrow icon
2. The selection number no longer breaks onto its own line
3. Options have a min-width so short labels can't result in small click
   targets
2019-04-10 10:34:10 -05:00

156 lines
2.7 KiB
SCSS

.ember-power-select-trigger,
.dropdown-trigger {
position: relative;
padding: 0.3em 16px 0.3em 0.3em;
border-radius: $radius;
box-shadow: $button-box-shadow-standard;
background: $white-bis;
border: 1px solid $grey-light;
outline: none;
cursor: pointer;
&:focus {
box-shadow: $button-box-shadow-standard, inset 0 0 0 2px $grey-lighter;
}
&.is-outlined {
border-color: rgba($white, 0.5);
color: $white;
background: transparent;
box-shadow: $button-box-shadow-standard, 0 0 2px 2px rgba($black, 0.1);
.ember-power-select-status-icon {
border-top-color: rgba($white, 0.75);
}
.ember-power-select-prefix {
color: rgba($white, 0.75);
}
}
}
.button-bar {
display: inline-flex;
flex-direction: row;
box-shadow: $button-box-shadow-standard;
.dropdown {
display: flex;
position: relative;
& + .dropdown {
margin-left: -1px;
}
}
.ember-power-select-trigger,
.dropdown-trigger {
border-radius: 0;
box-shadow: none;
&:focus {
box-shadow: inset 0 0 0 2px $grey-lighter;
}
}
.dropdown:first-child {
.ember-power-select-trigger,
.dropdown-trigger {
border-top-left-radius: $radius;
border-bottom-left-radius: $radius;
}
}
.dropdown:last-child {
.ember-power-select-trigger,
.dropdown-trigger {
border-top-right-radius: $radius;
border-bottom-right-radius: $radius;
}
}
}
.dropdown-trigger-label {
margin-left: 8px;
margin-right: 8px;
display: inline-block;
white-space: nowrap;
}
.ember-power-select-selected-item,
.dropdown-item {
text-overflow: ellipsis;
white-space: nowrap;
}
.ember-power-select-prefix,
.dropdown-prefix {
color: $grey;
}
.ember-power-select-option,
.dropdown-option {
.ember-power-select-prefix,
.dropdown-prefix {
display: none;
}
}
.dropdown-options,
.ember-power-select-options {
margin: 0;
padding: 0;
}
// Bulma override
.menu-list li ul.ember-power-select-options {
margin: 0;
padding: 0;
}
.dropdown-options {
border: 1px solid $grey-light;
margin-top: -1px;
max-height: 400px;
overflow: auto;
& > ul {
width: 100%;
}
.dropdown-option {
margin: 0;
padding: 0;
white-space: nowrap;
line-height: 1.75;
label {
display: block;
padding: 3px 8px;
min-width: 100px;
cursor: pointer;
}
& + .dropdown-option {
border-top: 1px solid $grey-lighter;
}
&:hover,
&:focus {
background: $white-bis;
outline: none;
border-left: 2px solid $blue;
label {
padding-left: 6px;
min-width: 98px;
}
}
}
.dropdown-empty {
display: block;
padding: 8px 12px;
color: $grey-light;
}
}