File: //proc/self/cwd/wp-content/plugins/pixel-caffeine/includes/admin/assets/sass/_select2-custom.scss
.select2-container {
height: auto;
padding-top: 0;
padding-bottom: 2px; //to show form-control border-bottom
z-index: 1;
&:hover {
background-color: $field-bg-hover;
}
.select2-choice,
.select2-choices {
height: $mdb-input-height-base - 1px;
line-height: $mdb-input-height-base - 1px;
border: none;
border-radius: 0;
background: $field-bg;
.select2-arrow {
width: 30px;
background: none;
border-left: none;
b {
display: none;
}
&::before {
$this__W: 6px;
content:"";
position: absolute;
top: 50%;
left: 50%;
margin-top: -$this__W/2;
margin-left: -$this__W;
width: 0;
height: 0;
border-style: solid;
border-width: $this__W $this__W 0 $this__W;
border-color: $black transparent transparent transparent;
}
}
}
.select2-choice {
padding-left: 0;
padding-right: 0;
background-color: transparent;
&:hover {
text-decoration: none;
color: $wp-admin-text-color;
}
}
&.select2-container-active {
.select2-choices,
.select2-choice {
@include box-shadow(none);
}
}
&.select2-container {
display: block !important;
}
&.select2-container-disabled {
background: $field-disabled-bg;
border-bottom: 1px dotted $mdb-input-underline-color;
cursor: $cursor-disabled;
.select2-choice {
background: none;
border: none;
pointer-events: none;
color: $field-disabled-color !important; // To overwrite select2 default (!important) style
.select2-chosen {
color: inherit;
}
.select2-arrow::before {
border-color: $field-disabled-color transparent transparent transparent;
}
}
}
// LOADING - SET UP
.select2-chosen,
.select2-arrow {
transition: opacity 0.3s ease-out;
}
&::after { //* loading icon
opacity: 0;
transition: opacity 0.3s ease-out;
}
&.loading-data {
pointer-events: none;
&::after {
position: absolute;
top: 9px;
right: 14px;
color: $wp-admin-text-color;
opacity: 0.75;
font-size: 1.5em;
}
.select2-chosen {
opacity: 0.5;
}
.select2-arrow {
opacity: 0;
}
}
}
.form-group .select2-container-multi.form-control {
padding-left: 0;
padding-right: 0;
}
.select2-container-multi {
&:hover {
background-color: $field-bg;
}
.select2-choices {
$this__padding-min: 7px;
$this__icon-W: 20px;
background-color: transparent;
padding: 0 $padding-small-horizontal;
.select2-search-field .select2-input {
padding: 0;
margin: 0;
}
.select2-search-field,
.select2-search-choice {
float: none;
display: inline-block;
margin: 0px 5px 0px 0;
}
.select2-search-choice {
position: relative;
top: 1px; //fix positioning
background: lighten($brand-primary,40%);
padding: $this__padding-min $this__icon-W + $this__padding-min $this__padding-min $this__padding-min;
//margin: $general-margin $general-margin $general-margin 0;
border: none;
border-radius: 0;
text-transform: uppercase;
font-size: 0.85em;
font-weight: $font-weight-bold;
@include box-shadow(none);
}
.select2-search-choice-close {
top: 50%;
margin-top: -$this__icon-W/2;
left: auto;
width: $this__icon-W;
height: $this__icon-W;
line-height: $this__icon-W;
background: none !important; // to override plugin style that already has an !important
text-align: center;
&::before {
@include material-icons(close);
color: $brand-primary;
font-size: 18px;
}
&:hover {
&::before {
color: $red;
}
}
}
}
&.select2-container-active {
.select2-choices {
border: none;
}
}
}
.select2-drop {
@include shadow-z-1;
background: $select-dropdown-bg;
border: none;
.select2-search {
$this__icon-W: 30px;
padding: $padding-small-horizontal;
&::before {
position: absolute;
right: $padding-small-horizontal;
width: $this__icon-W;
@include material-icons(search);
line-height: $mdb-input-height-base;
color: $select-option-bg-hover;
font-size: 1.5em;
}
.select2-input {
min-height: $mdb-input-height-base;
background-color: $white;
background-image: none !important; // to override plugin style that already has an !important
border-color: $select-option-bg-hover;
padding-right: $this__icon-W;
&.select2-focused {
@include box-shadow(inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px lighten($brand-primary, 20%));
}
}
}
&.select2-drop-above.select2-drop-active {
border-top: none;
@include shadow-z-1;
}
&.dropdown-width-max {
width: auto !important;
}
}
.select2-drop-multi {
@include translate(0,1px);
}
.select2-results {
padding: 0;
margin: 0;
font-size: $font-size-base;
font-weight: 300;
background: none;
.select2-result,
.select2-no-results {
padding: $padding-small-horizontal;
margin-bottom: 0;
}
.select2-result {
border-top: 1px solid lighten($select-option-bg-hover,10%);
margin: 0;
border-radius: 0;
}
.select2-no-results {
background: none;
}
.select2-result-label {
padding: 0;
}
.select2-highlighted {
background: $select-option-bg-hover;
color: $white;
&:active {
background: $brand-primary;
color: $white;
}
}
.select2-add {
$this__icon-W: 30px;
background-color: darken($select-dropdown-bg,50%);
color: $white;
.select2-result-label {
&::before {
position: relative;
left: 0;
@include material-icons(add_circle);
color: $white;
margin-right: 10px;
}
}
}
}
.select2-dropdown-open.select2-drop-above {
.select2-choice,
.select2-choices {
background: none;
border: none;
}
.select2-add {
background-color: darken($select-dropdown-bg,50%);
}
}
.input-group-btn {
padding-left: 0;
.select2-container {
margin-bottom: 0;
.select2-choice {
height: $mdb-input-height-base;
}
}
}