|
1 | 1 | <style>
|
| 2 | + .v-select { |
| 3 | + position: relative; |
| 4 | + } |
2 | 5 | .v-select,
|
3 | 6 | .v-select * {
|
4 | 7 | -webkit-box-sizing: border-box;
|
5 | 8 | -moz-box-sizing: border-box;
|
6 | 9 | box-sizing: border-box;
|
7 | 10 | font-family: sans-serif;
|
8 | 11 | }
|
9 |
| -
|
10 |
| - .v-select ::after, |
11 |
| - .v-select ::before { |
12 |
| - -webkit-box-sizing: inherit; |
13 |
| - box-sizing: inherit; |
14 |
| - } |
15 |
| -
|
16 |
| - .v-select a:not([href]):not([tabindex]):focus, |
17 |
| - .v-select a:not([href]):not([tabindex]):hover { |
18 |
| - color: #fff; |
19 |
| - } |
20 |
| -
|
21 |
| - .v-select input[type="search"] { |
22 |
| -
|
23 |
| - } |
24 |
| -
|
25 |
| - .dropdown-menu > li > a { |
26 |
| -
|
27 |
| - } |
28 |
| -
|
29 |
| - button.close { |
30 |
| - appearance: none; |
31 |
| - padding: 0; |
32 |
| - cursor: pointer; |
33 |
| - background: 0 0; |
34 |
| - border: 0; |
35 |
| - font-weight: 700; |
36 |
| - line-height: 1; |
37 |
| - color: #000; |
38 |
| - text-shadow: 0 1px 0 #fff; |
39 |
| - filter: alpha(opacity=20); |
40 |
| - opacity: .2; |
41 |
| - } |
42 |
| -
|
43 |
| - .v-select .dropdown-toggle { |
44 |
| - -webkit-appearance: none; |
45 |
| - -moz-appearance: none; |
46 |
| - appearance: none; |
47 |
| - } |
48 |
| -
|
49 |
| - /* - - - - - - - - - - - - - - - - */ |
50 |
| -
|
51 |
| - .v-select { |
52 |
| - position: relative; |
53 |
| - } |
54 |
| -
|
| 12 | + /* Open Indicator */ |
55 | 13 | .v-select .open-indicator {
|
56 | 14 | position: absolute;
|
57 | 15 | bottom: 6px;
|
|
63 | 21 | transition-timing-function: cubic-bezier(1.000, -0.115, 0.975, 0.855);
|
64 | 22 | opacity: 1;
|
65 | 23 | transition: opacity .1s;
|
| 24 | + height: 20px; width: 10px; |
66 | 25 | }
|
67 |
| -
|
68 |
| - .v-select.loading .open-indicator { |
69 |
| - opacity: 0; |
70 |
| - } |
71 |
| -
|
72 | 26 | .v-select .open-indicator:before {
|
73 | 27 | border-color: rgba(60, 60, 60, .5);
|
74 | 28 | border-style: solid;
|
|
81 | 35 | transform: rotate(133deg);
|
82 | 36 | transition: all 150ms cubic-bezier(1.000, -0.115, 0.975, 0.855);
|
83 | 37 | transition-timing-function: cubic-bezier(1.000, -0.115, 0.975, 0.855);
|
| 38 | + box-sizing: inherit; |
| 39 | + } |
| 40 | + /* Open Indicator States */ |
| 41 | + .v-select.open .open-indicator:before { |
| 42 | + transform: rotate(315deg); |
| 43 | + } |
| 44 | + .v-select.loading .open-indicator { |
| 45 | + opacity: 0; |
| 46 | + } |
| 47 | + .v-select.open .open-indicator { |
| 48 | + bottom: 1px; |
| 49 | + } |
| 50 | + /* Dropdown Toggle */ |
| 51 | + .v-select .dropdown-toggle { |
| 52 | + -webkit-appearance: none; |
| 53 | + -moz-appearance: none; |
| 54 | + appearance: none; |
84 | 55 | }
|
85 |
| -
|
86 | 56 | .v-select .dropdown-toggle {
|
87 | 57 | display: block;
|
88 | 58 | padding: 0;
|
|
91 | 61 | border-radius: 4px;
|
92 | 62 | white-space: normal;
|
93 | 63 | }
|
94 |
| -
|
95 | 64 | .v-select .dropdown-toggle:after {
|
96 | 65 | visibility: hidden;
|
97 | 66 | display: block;
|
|
100 | 69 | clear: both;
|
101 | 70 | height: 0;
|
102 | 71 | }
|
103 |
| -
|
| 72 | + /* Dropdown Toggle States */ |
104 | 73 | .v-select.searchable .dropdown-toggle {
|
105 | 74 | cursor: text;
|
106 | 75 | }
|
107 |
| -
|
108 | 76 | .v-select.unsearchable .dropdown-toggle {
|
109 | 77 | cursor: pointer;
|
110 | 78 | }
|
111 |
| -
|
112 |
| - .v-select > .dropdown-menu { |
| 79 | + .v-select.open .dropdown-toggle { |
| 80 | + border-bottom-color: transparent; |
| 81 | + border-bottom-left-radius: 0; |
| 82 | + border-bottom-right-radius: 0; |
| 83 | + } |
| 84 | + /* Dropdown Menu */ |
| 85 | + .v-select .dropdown-menu { |
113 | 86 | position: absolute;
|
114 | 87 | top: 100%;
|
115 | 88 | left: 0;
|
|
134 | 107 | -webkit-box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
|
135 | 108 | box-shadow: 0 6px 12px rgba(0, 0, 0, .175);
|
136 | 109 | }
|
137 |
| -
|
138 |
| - /*divider*/ |
139 |
| - /*.v-select > .dropdown-menu*/ |
140 |
| - .dropdown-menu .divider { |
| 110 | + .v-select .dropdown-menu .divider { |
141 | 111 | height: 1px;
|
142 |
| - margin: 9px 0; |
| 112 | + margin: 7px 0; |
143 | 113 | overflow: hidden;
|
144 | 114 | background-color: #e5e5e5;
|
145 | 115 | }
|
146 |
| -
|
147 |
| - .v-select .text-center { |
| 116 | + .v-select .no-options { |
148 | 117 | text-align: center;
|
| 118 | + padding-bottom: 2px; |
149 | 119 | }
|
150 |
| -
|
151 |
| - /*text-center*/ |
152 |
| -
|
| 120 | + /* Selected Tags */ |
153 | 121 | .v-select .selected-tag {
|
154 | 122 | color: #333;
|
155 | 123 | background-color: #f0f0f0;
|
|
159 | 127 | margin: 4px 1px 0px 3px;
|
160 | 128 | padding: 0 0.25em;
|
161 | 129 | float: left;
|
162 |
| - line-height: 1.7em; |
| 130 | + line-height: 24px; |
163 | 131 | }
|
164 |
| -
|
165 | 132 | .v-select .selected-tag .close {
|
166 | 133 | float: none;
|
167 | 134 | margin-right: 0;
|
168 | 135 | font-size: 20px;
|
| 136 | + appearance: none; |
| 137 | + padding: 0; |
| 138 | + cursor: pointer; |
| 139 | + background: 0 0; |
| 140 | + border: 0; |
| 141 | + font-weight: 700; |
| 142 | + line-height: 1; |
| 143 | + color: #000; |
| 144 | + text-shadow: 0 1px 0 #fff; |
| 145 | + filter: alpha(opacity=20); |
| 146 | + opacity: .2; |
169 | 147 | }
|
170 |
| -
|
171 |
| - /* -- Search Input -- */ |
| 148 | + /* Search Input */ |
172 | 149 | .v-select input[type="search"]::-webkit-search-decoration,
|
173 | 150 | .v-select input[type="search"]::-webkit-search-cancel-button,
|
174 | 151 | .v-select input[type="search"]::-webkit-search-results-button,
|
175 | 152 | .v-select input[type="search"]::-webkit-search-results-decoration {
|
176 | 153 | display: none;
|
177 | 154 | }
|
178 |
| -
|
179 | 155 | .v-select input[type=search],
|
180 | 156 | .v-select input[type=search]:focus {
|
181 | 157 | appearance: none;
|
|
197 | 173 | float: left;
|
198 | 174 | clear: none;
|
199 | 175 | }
|
200 |
| -
|
| 176 | + /* Search Input States */ |
201 | 177 | .v-select.unsearchable input[type=search] {
|
202 | 178 | max-width: 1px;
|
203 | 179 | }
|
204 |
| -
|
| 180 | + /* List Items */ |
205 | 181 | .v-select li > a {
|
206 | 182 | display: block;
|
207 | 183 | padding: 3px 20px;
|
208 | 184 | clear: both;
|
209 |
| - font-weight: 400; |
210 |
| - line-height: 1.42857143; |
211 |
| - color: #333; |
| 185 | + line-height: 1.42857143; /* Normalize line height */ |
| 186 | + color: #333; /* Overrides most CSS frameworks */ |
212 | 187 | white-space: nowrap;
|
213 | 188 | }
|
214 |
| -
|
215 | 189 | .v-select li:hover {
|
216 | 190 | cursor: pointer;
|
217 | 191 | }
|
218 |
| -
|
219 |
| - .v-select .active > a { |
| 192 | + .v-select .dropdown-menu .active > a { |
| 193 | + color: #333; |
220 | 194 | background: rgba(50, 50, 50, .1);
|
221 |
| - /*color: #333;*/ |
222 | 195 | }
|
223 |
| -
|
224 |
| - .v-select .highlight > a { |
| 196 | + .v-select .dropdown-menu > .highlight > a { |
| 197 | + /* |
| 198 | + * required to override bootstrap 3's |
| 199 | + * .dropdown-menu > li > a:hover {} styles |
| 200 | + */ |
225 | 201 | background: #5897fb;
|
226 | 202 | color: #fff;
|
227 | 203 | }
|
228 |
| -
|
229 |
| - .v-select .highlight > a { |
230 |
| - background: #5897fb; |
231 |
| - color: #fff; |
| 204 | + .v-select .highlight:not(:last-child) { |
| 205 | + margin-bottom: 0; /* Fixes Bulma Margin */ |
232 | 206 | }
|
233 |
| -
|
| 207 | + /* Loading Spinner */ |
234 | 208 | .v-select .spinner {
|
235 | 209 | opacity: 0;
|
236 | 210 | position: absolute;
|
|
247 | 221 | animation: vSelectSpinner 1.1s infinite linear;
|
248 | 222 | transition: opacity .1s;
|
249 | 223 | }
|
250 |
| -
|
251 |
| - .v-select.loading .spinner { |
252 |
| - opacity: 1; |
253 |
| - } |
254 |
| -
|
255 | 224 | .v-select .spinner,
|
256 | 225 | .v-select .spinner:after {
|
257 | 226 | border-radius: 50%;
|
258 | 227 | width: 5em;
|
259 | 228 | height: 5em;
|
260 | 229 | }
|
261 |
| -
|
262 |
| - /* -- Open State -- */ |
263 |
| - .v-select.open .open-indicator { |
264 |
| - bottom: 1px; |
265 |
| - } |
266 |
| -
|
267 |
| - .v-select.open .open-indicator:before { |
268 |
| - transform: rotate(315deg); |
269 |
| - } |
270 |
| -
|
271 |
| - .v-select.open .dropdown-toggle { |
272 |
| - border-bottom: none; |
273 |
| - border-bottom-left-radius: 0; |
274 |
| - border-bottom-right-radius: 0; |
| 230 | + /* Loading Spinner States */ |
| 231 | + .v-select.loading .spinner { |
| 232 | + opacity: 1; |
275 | 233 | }
|
276 |
| -
|
| 234 | + /* KeyFrames */ |
277 | 235 | @-webkit-keyframes vSelectSpinner {
|
278 | 236 | 0% {
|
279 | 237 | transform: rotate(0deg);
|
|
282 | 240 | transform: rotate(360deg);
|
283 | 241 | }
|
284 | 242 | }
|
285 |
| -
|
286 | 243 | @keyframes vSelectSpinner {
|
287 | 244 | 0% {
|
288 | 245 | transform: rotate(0deg);
|
|
339 | 296 | <li v-if="!filteredOptions.length" class="divider"></li>
|
340 | 297 | </transition>
|
341 | 298 | <transition name="fade">
|
342 |
| - <li v-if="!filteredOptions.length" class="text-center"> |
| 299 | + <li v-if="!filteredOptions.length" class="no-options"> |
343 | 300 | <slot name="no-options">Sorry, no matching options.</slot>
|
344 | 301 | </li>
|
345 | 302 | </transition>
|
|
0 commit comments