2019-07-18 16:22:11 +02:00
|
|
|
//
|
|
|
|
// Plugin: Select2
|
|
|
|
//
|
2015-10-31 22:00:16 +01:00
|
|
|
|
|
|
|
//Signle select
|
2019-09-25 10:24:16 +02:00
|
|
|
// .select2-container--default,
|
|
|
|
// .select2-selection {
|
|
|
|
// &.select2-container--focus,
|
|
|
|
// &:focus,
|
|
|
|
// &:active {
|
|
|
|
// outline: none;
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
|
|
|
|
.select2-container--default {
|
2015-10-31 22:00:16 +01:00
|
|
|
.select2-selection--single {
|
2019-09-25 10:24:16 +02:00
|
|
|
border: $input-border-width solid $input-border-color;
|
2016-10-22 21:32:28 +02:00
|
|
|
//border-radius: $input-radius;
|
2019-07-18 16:22:11 +02:00
|
|
|
padding: 6px 12px;
|
2019-07-29 21:37:35 +02:00
|
|
|
height: $input-height;
|
2015-10-31 22:00:16 +01:00
|
|
|
}
|
|
|
|
|
2019-08-20 12:48:22 +02:00
|
|
|
&.select2-container--open {
|
2019-09-25 10:24:16 +02:00
|
|
|
border-color: $primary;
|
2019-08-20 12:48:22 +02:00
|
|
|
}
|
2015-10-31 22:00:16 +01:00
|
|
|
|
2019-08-20 12:48:22 +02:00
|
|
|
& .select2-dropdown {
|
2019-09-25 10:24:16 +02:00
|
|
|
border: $input-border-width solid $input-border-color;
|
2019-08-20 12:48:22 +02:00
|
|
|
//border-radius: $input-radius;
|
|
|
|
}
|
2015-10-31 22:00:16 +01:00
|
|
|
|
2019-08-20 12:48:22 +02:00
|
|
|
& .select2-results__option {
|
|
|
|
padding: 6px 12px;
|
|
|
|
user-select: none;
|
|
|
|
-webkit-user-select: none;
|
|
|
|
}
|
2015-10-31 22:00:16 +01:00
|
|
|
|
2019-08-20 12:48:22 +02:00
|
|
|
& .select2-selection--single .select2-selection__rendered {
|
|
|
|
padding-left: 0;
|
2019-10-11 12:22:05 +02:00
|
|
|
//padding-right: 0;
|
2019-08-20 12:48:22 +02:00
|
|
|
height: auto;
|
|
|
|
margin-top: -3px;
|
|
|
|
}
|
2015-10-31 22:00:16 +01:00
|
|
|
|
2019-08-20 12:48:22 +02:00
|
|
|
&[dir="rtl"] .select2-selection--single .select2-selection__rendered {
|
|
|
|
padding-right: 6px;
|
|
|
|
padding-left: 20px;
|
|
|
|
}
|
2015-10-31 22:00:16 +01:00
|
|
|
|
2019-08-20 12:48:22 +02:00
|
|
|
& .select2-selection--single .select2-selection__arrow {
|
|
|
|
height: 31px;
|
|
|
|
right: 6px;
|
|
|
|
}
|
2015-10-31 22:00:16 +01:00
|
|
|
|
2019-08-20 12:48:22 +02:00
|
|
|
& .select2-selection--single .select2-selection__arrow b {
|
|
|
|
margin-top: 0;
|
|
|
|
}
|
2015-10-31 22:00:16 +01:00
|
|
|
|
2019-08-20 12:48:22 +02:00
|
|
|
.select2-dropdown,
|
|
|
|
.select2-search--inline {
|
|
|
|
.select2-search__field {
|
2019-09-25 10:24:16 +02:00
|
|
|
border: $input-border-width solid $input-border-color;
|
|
|
|
|
2019-08-20 12:48:22 +02:00
|
|
|
&:focus {
|
|
|
|
outline: none;
|
2019-09-25 10:24:16 +02:00
|
|
|
border: $input-border-width solid $input-focus-border-color;
|
2019-08-20 12:48:22 +02:00
|
|
|
}
|
2015-10-31 22:00:16 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-09-25 10:24:16 +02:00
|
|
|
.select2-dropdown {
|
|
|
|
&.select2-dropdown--below {
|
|
|
|
border-top: 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
&.select2-dropdown--above {
|
|
|
|
border-bottom: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.select2-results__option {
|
|
|
|
&[aria-disabled='true'] {
|
|
|
|
color: $gray-600;
|
|
|
|
}
|
|
|
|
|
|
|
|
&[aria-selected='true'] {
|
|
|
|
$color: $gray-300;
|
|
|
|
|
|
|
|
background-color: $color;
|
|
|
|
|
|
|
|
&,
|
|
|
|
&:hover {
|
|
|
|
color: color-yiq($color);
|
|
|
|
}
|
|
|
|
}
|
2015-10-31 22:00:16 +01:00
|
|
|
}
|
|
|
|
|
2019-09-25 10:24:16 +02:00
|
|
|
.select2-results__option--highlighted {
|
|
|
|
$color: $primary;
|
|
|
|
background-color: $color;
|
|
|
|
color: color-yiq($color);
|
|
|
|
|
|
|
|
&[aria-selected] {
|
|
|
|
$color: darken($color, 3%);
|
|
|
|
|
|
|
|
&,
|
|
|
|
&:hover {
|
|
|
|
background-color: $color;
|
|
|
|
color: color-yiq($color);
|
|
|
|
}
|
2015-10-31 22:00:16 +01:00
|
|
|
}
|
2019-08-20 12:48:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
//Multiple select
|
|
|
|
& {
|
|
|
|
.select2-selection--multiple {
|
2019-09-25 10:24:16 +02:00
|
|
|
border: $input-border-width solid $input-border-color;
|
|
|
|
height: $input-height;
|
|
|
|
|
2019-08-20 12:48:22 +02:00
|
|
|
&:focus {
|
2019-09-25 10:24:16 +02:00
|
|
|
border-color: $input-focus-border-color;
|
2019-08-20 12:48:22 +02:00
|
|
|
}
|
2019-06-14 09:33:43 +02:00
|
|
|
|
2019-09-25 10:24:16 +02:00
|
|
|
.select2-selection__rendered {
|
|
|
|
padding: 0 $input-padding-y;
|
|
|
|
|
|
|
|
li:first-child.select2-search.select2-search--inline {
|
|
|
|
width: 100%;
|
2019-06-14 09:33:43 +02:00
|
|
|
|
2019-09-25 10:24:16 +02:00
|
|
|
.select2-search__field {
|
|
|
|
width: 100% !important;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
.select2-search.select2-search--inline {
|
|
|
|
.select2-search__field {
|
|
|
|
border: 0;
|
|
|
|
margin-top: 6px;
|
|
|
|
}
|
2019-08-20 12:48:22 +02:00
|
|
|
}
|
2019-06-14 09:33:43 +02:00
|
|
|
}
|
|
|
|
}
|
2019-09-25 10:24:16 +02:00
|
|
|
|
2019-08-20 12:48:22 +02:00
|
|
|
&.select2-container--focus .select2-selection--multiple {
|
2019-09-25 10:24:16 +02:00
|
|
|
border-color: $input-focus-border-color;
|
|
|
|
|
|
|
|
.select2-search__field {
|
|
|
|
border: 0;
|
|
|
|
}
|
2019-08-20 12:48:22 +02:00
|
|
|
}
|
2015-10-31 22:00:16 +01:00
|
|
|
}
|
2019-08-20 12:48:22 +02:00
|
|
|
|
2019-09-25 10:24:16 +02:00
|
|
|
.select2-selection--multiple {
|
|
|
|
.select2-selection__choice {
|
|
|
|
background-color: $primary;
|
|
|
|
border-color: darken($primary, 5%);
|
|
|
|
color: color-yiq($primary);
|
|
|
|
padding: 0 10px;
|
|
|
|
}
|
2015-10-31 22:00:16 +01:00
|
|
|
|
2019-09-25 10:24:16 +02:00
|
|
|
.select2-selection__choice__remove {
|
|
|
|
color: rgba(255, 255, 255, 0.7);
|
|
|
|
float: right;
|
|
|
|
margin-left: 5px;
|
|
|
|
margin-right: -2px;
|
|
|
|
|
|
|
|
&:hover {
|
|
|
|
color: $white;
|
|
|
|
}
|
2019-08-20 12:48:22 +02:00
|
|
|
}
|
|
|
|
}
|
2015-10-31 22:00:16 +01:00
|
|
|
|
2019-08-20 12:48:22 +02:00
|
|
|
& .select2-selection--single .select2-selection__rendered li {
|
|
|
|
padding-right: 10px;
|
2015-10-31 22:00:16 +01:00
|
|
|
}
|
2019-09-25 10:24:16 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// Background colors (theme colors)
|
|
|
|
@each $name, $color in $theme-colors {
|
|
|
|
@include select2-variant($name, $color);
|
|
|
|
}
|
2015-10-31 22:00:16 +01:00
|
|
|
|
2019-09-25 10:24:16 +02:00
|
|
|
// Background colors (colors)
|
|
|
|
@each $name, $color in $colors {
|
|
|
|
@include select2-variant($name, $color);
|
2015-10-31 22:00:16 +01:00
|
|
|
}
|