forked from selectize/selectize.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
selectize.bootstrap4.scss
173 lines (155 loc) · 5.1 KB
/
selectize.bootstrap4.scss
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
@import "../../vendor/bootstrap4/functions";
@import "../../vendor/bootstrap4/variables";
@import "../../vendor/bootstrap4/mixins";
$enable-shadows: true !default;
$select-font-family: inherit !default;
$select-font-size: inherit !default;
$select-line-height: $input-btn-line-height !default; //formerly line-height-computed
$select-color-text: gray("800") !default; //$gray-800
$select-color-highlight: rgba(255, 237, 40, 0.4) !default;
$select-color-input: $input-bg !default;
$select-color-input-full: $input-bg !default;
$select-color-input-error: theme-color("danger") !default;
$select-color-input-error-focus: darken(
$select-color-input-error,
10%
) !default;
$select-color-disabled: $input-bg !default;
$select-color-item: #efefef !default;
$select-color-item-border: $border-color !default;
$select-color-item-active: $component-active-bg !default;
$select-color-item-active-text: #fff !default;
$select-color-item-active-border: rgba(0, 0, 0, 0) !default;
$select-color-optgroup: $dropdown-bg !default;
$select-color-optgroup-text: $dropdown-header-color !default;
$select-color-optgroup-border: $dropdown-divider-bg !default;
$select-color-dropdown: $dropdown-bg !default;
$select-color-dropdown-border-top: mix(
$input-border-color,
$input-bg,
0.8
) !default;
$select-color-dropdown-item-active: $dropdown-link-hover-bg !default;
$select-color-dropdown-item-active-text: $dropdown-link-hover-color !default;
$select-color-dropdown-item-create-active-text: $dropdown-link-hover-color !default;
$select-opacity-disabled: 0.5 !default;
$select-shadow-input: none !default;
$select-shadow-input-focus: inset 0 1px 2px rgba(0, 0, 0, 0.15) !default;
$select-shadow-input-error: inset 0 1px 1px rgba(0, 0, 0, 0.075) !default;
$select-shadow-input-error-focus: inset 0 1px 1px rgba(0, 0, 0, 0.075),
0 0 6px lighten($select-color-input-error, 20%) !default;
$select-border: 1px solid $input-border-color !default;
$select-border-radius: $input-border-radius !default;
$select-width-item-border: 0px !default;
$select-padding-x: $input-btn-padding-x !default;
$select-padding-y: $input-btn-padding-y !default;
$select-padding-dropdown-item-x: $input-btn-padding-x !default;
$select-padding-dropdown-item-y: 3px !default;
$select-padding-item-x: 5px !default;
$select-padding-item-y: 1px !default;
$select-margin-item-x: 3px !default;
$select-margin-item-y: 3px !default;
$select-arrow-size: 5px !default;
$select-arrow-color: $select-color-text !default;
$select-arrow-offset: calc(#{$select-padding-x} + 5px) !default;
@import "selectize";
.#{$selectize}-dropdown,
.#{$selectize}-dropdown.form-control {
height: auto;
padding: 0;
margin: 2px 0 0 0;
z-index: $zindex-dropdown;
background: $select-color-dropdown;
border: 1px solid $dropdown-border-color; //$dropdown-fallback-border
border-radius: $border-radius;
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.175);
}
.#{$selectize}-dropdown {
.optgroup-header {
font-size: $font-size-sm;
line-height: $line-height-base;
}
.optgroup:first-child:before {
display: none;
}
.optgroup:before {
content: " ";
display: block;
height: 0;
margin: $dropdown-divider-margin-y 0;
overflow: hidden;
border-top: 1px solid $dropdown-divider-bg;
margin-left: $select-padding-dropdown-item-x * -1;
margin-right: $select-padding-dropdown-item-x * -1;
}
.create {
padding-left: $select-padding-dropdown-item-x;
}
}
.#{$selectize}-dropdown-content {
padding: 5px 0;
}
.#{$selectize}-dropdown-emptyoptionlabel {
text-align: center;
}
.#{$selectize}-input {
min-height: $input-height;
@include box-shadow($input-box-shadow);
@include transition($input-transition);
&.dropdown-active {
border-radius: $select-border-radius;
}
&.dropdown-active::before {
display: none;
}
&.focus {
border-color: $input-focus-border-color;
outline: 0;
@if $enable-shadows {
box-shadow: $input-box-shadow, $input-focus-box-shadow;
} @else {
box-shadow: $input-focus-box-shadow;
}
}
}
.is-invalid .#{$selectize}-input {
border-color: $select-color-input-error;
box-shadow: $select-shadow-input-error;
&:focus {
border-color: $select-color-input-error-focus;
box-shadow: $select-shadow-input-error-focus;
}
}
.#{$selectize}-control {
&.form-control-sm {
.#{$selectize}-input.has-items {
min-height: $input-height-sm !important;
height: $input-height-sm;
padding: $input-padding-y-sm $input-padding-x-sm !important;
font-size: $input-font-size-sm;
line-height: $input-line-height-sm;
}
}
&.multi {
.#{$selectize}-input.has-items {
height: auto;
padding-left: calc(#{$select-padding-x} - #{$select-padding-item-x});
padding-right: calc(#{$select-padding-x} - #{$select-padding-item-x});
}
.#{$selectize}-input > div {
border-radius: calc(#{$select-border-radius} - 1px);
}
}
}
.form-control.#{$selectize}-control {
padding: 0;
height: auto;
border: none;
background: none;
box-shadow: none;
border-radius: 0;
}
.input-group .#{$selectize}-input {
overflow: unset;
border-radius: 0 $select-border-radius $select-border-radius 0;
}