124 lines
2.8 KiB
SCSS
124 lines
2.8 KiB
SCSS
@import 'common/sass/variables';
|
|
|
|
.Select {
|
|
border-radius: 2px;
|
|
background-color: color(control-bg);
|
|
border: 1px solid color(control-border);
|
|
border-radius: 2px;
|
|
font-weight: 400;
|
|
font-size: 1rem;
|
|
box-shadow: inset 0 1px 0 0 color(control-inset-shadow);
|
|
transition: border-color 120ms, box-shadow 120ms;
|
|
height: $input-height-base;
|
|
|
|
&-control {
|
|
min-width: 7.5rem;
|
|
height: inherit;
|
|
border: none !important;
|
|
box-shadow: none !important;
|
|
background-color: transparent !important;
|
|
border: none !important;
|
|
&:hover {
|
|
box-shadow: none;
|
|
}
|
|
}
|
|
&-placeholder {
|
|
line-height: $line-height-base;
|
|
color: color(control-placeholder);
|
|
}
|
|
&-input {
|
|
position: absolute;
|
|
> input {
|
|
line-height: $line-height-base;
|
|
padding: 0;
|
|
}
|
|
}
|
|
&-placeholder,
|
|
&-input {
|
|
padding-left: 0;
|
|
padding-right: 0;
|
|
padding: 0rem 1rem;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
display: block;
|
|
height: auto;
|
|
}
|
|
&-option {
|
|
padding: 0.75rem 1rem;
|
|
background: color(control-bg);
|
|
color: shade-dark(0.8);
|
|
|
|
&.is-selected {
|
|
background: shade-dark(0.03);
|
|
color: color(text-color);
|
|
}
|
|
|
|
&.is-focused {
|
|
background: color(brand-primary);
|
|
color: color(text-color-inverted);
|
|
}
|
|
}
|
|
&-menu-outer {
|
|
z-index: 3;
|
|
width: calc(100% + 2px);
|
|
left: -1px;
|
|
background-color: color(control-bg);
|
|
border: 2px solid color(brand-primary);
|
|
border-top: none;
|
|
border-radius: $input-border-radius;
|
|
border-top-left-radius: 0;
|
|
border-top-right-radius: 0;
|
|
border-color: inherit;
|
|
}
|
|
&-menu {
|
|
max-height: 10.0625rem;
|
|
}
|
|
// Selects should never have invalid input
|
|
// &.invalid {
|
|
// border-color: color(brand-danger);
|
|
// box-shadow: inset 0px 0px 0px 1px color(brand-danger);
|
|
// }
|
|
&.is-focused {
|
|
border-color: color(brand-primary);
|
|
box-shadow: inset 0px 0px 0px 1px color(brand-primary);
|
|
&.valid {
|
|
border-color: color(brand-success);
|
|
box-shadow: inset 0px 0px 0px 1px color(brand-success);
|
|
}
|
|
}
|
|
&-value {
|
|
line-height: $line-height-base !important;
|
|
padding-left: 0 !important;
|
|
padding: 0.75rem 1rem !important;
|
|
height: inherit !important;
|
|
|
|
&-label {
|
|
position: relative;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
display: block;
|
|
}
|
|
}
|
|
&-multi-value-wrapper {
|
|
display: block;
|
|
position: relative;
|
|
height: inherit;
|
|
}
|
|
|
|
// This shitty selector is the text color of the select, no joke.
|
|
&.has-value.Select--single > .Select-control .Select-value,
|
|
&.has-value.is-pseudo-focused.Select--single > .Select-control .Select-value {
|
|
.Select-value-label {
|
|
color: color(control-color);
|
|
}
|
|
}
|
|
|
|
// Identicons need to fit into the select
|
|
.Identicon {
|
|
display: inline-block;
|
|
width: 22px !important;
|
|
height: 22px !important;
|
|
top: -1px;
|
|
}
|
|
}
|