fleet/frontend/components/forms/fields/Dropdown/_styles.scss
Zachary Wasserman 759a69b5b7
Upgrade Bourbon to 5.1.0 and fix deprecation warnings (#1973)
- Replace uses of deprecated Bourbon helpers with raw CSS
- Add autoprefixer into the build chain to prefix the now removed helpers

This process was achieved by running through each of the deprecation warnings and using the following bash function to replace it in all files:

```
function bourbon-deprecate() {
    grep -rl "@include $1" ./frontend --exclude-dir=.git | xargs sed -i '' -E "s/@include $1[(](.*)[)]/$1: \1/g"
}
```

For some helpers, this did not result in valid CSS, so manual modifications were made.

Closes #1189 #1274
2019-01-03 12:46:55 -08:00

205 lines
3.4 KiB
SCSS

.dropdown {
&__label {
display: block;
font-size: 16px;
font-weight: $light;
color: $text-dark;
margin-bottom: $pad-xsmall;
&--error {
color: $alert;
}
}
&__select {
&--error {
&.Select {
.Select-control {
border-color: $alert;
background-color: $alert-light;
}
.Select-arrow {
border-top-color: $alert;
}
}
}
}
}
.Select {
.Select-control {
border: 1px solid $accent-medium;
border-radius: 2px;
height: 40px;
}
.Select-value {
font-size: $medium;
border-radius: 2px;
background-color: #fff;
box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.12), 0 2px 0 0 #b8c2e3;
border: solid 1px #b8c2e3;
.Select-value-icon {
border: 0;
float: right;
position: relative;
line-height: 28px;
width: 25px;
padding: 0;
margin: 0 5px;
text-indent: -999em;
&::after {
@extend %kolidecon;
transition: color 150ms ease-in-out;
transform: translate(-50%, -50%);
content: '\f036';
position: absolute;
top: 50%;
left: 50%;
visibility: visible;
font-size: 16px;
color: $accent-dark;
text-indent: 0;
}
&:hover {
&::after {
color: $accent-text;
}
}
}
.Select-value-label {
font-size: 16px;
font-weight: $normal;
color: $text-dark;
line-height: 28px;
}
}
&--single {
> .Select-control {
.Select-value {
line-height: 38px;
}
}
}
.Select-arrow {
border-top-color: $brand;
}
&.is-focused {
.Select-control {
border: 1px solid $brand;
}
&:not(.is-open) {
.Select-control {
box-shadow: none;
}
}
}
&.has-value {
> .Select-control,
&.is-pseudo-focused > .Select-control {
.Select-value {
.Select-value-label {
color: $text-dark;
font-size: 16px;
}
}
}
}
&.is-open {
.Select-control {
box-shadow: inset 0 0 8px 0 rgba(0, 0, 0, 0.08);
}
}
.Select-menu-outer {
margin-top: 2px;
box-shadow: 0 1px 3px 1px rgba($black, 0.05);
border: solid 1px $accent-light;
border-radius: 2px;
z-index: 6;
}
.Select-option {
color: $text-dark;
font-size: $medium;
&.is-focused {
background-color: $brand;
color: $white;
.Select-icon {
color: $brand-ultralight;
}
}
&.is-disabled {
color: $silver;
.Select-icon {
visibility: hidden;
opacity: 0;
}
}
}
.Select-icon {
color: $accent-medium;
}
.Select-placeholder {
color: $accent-text;
font-size: 16px;
line-height: 40px;
padding: 0 12px;
box-sizing: border-box;
}
&.Select--multi {
.Select-control {
display: flex;
align-items: center;
height: auto;
min-height: 40px;
}
.Select-multi-value-wrapper {
flex-grow: 1;
}
.Select-arrow-zone {
display: block;
}
.Select-option {
&.is-disabled {
color: $text-dark;
cursor: default;
&.is-focused {
background-color: $brand;
color: $white;
}
}
}
.Select-value {
margin-top: 3px;
margin-bottom: 3px;
}
.Select-value-label {
padding: 0 0 0 1rem;
}
}
}