9250f66d94d672e273d6cf477a2718cc60433fbd
[roojs1] / scss / roojs-bootstrap / select2.scss
1 /*
2 Version: 3.4.8 Timestamp: Thu May  1 09:50:32 EDT 2014
3 */
4 .roo-select2-container {
5     margin: 0;
6     position: relative;
7     /*display: inline-block;*/
8     /* inline-block for ie7 */
9     zoom: 1;
10     *display: inline;
11     vertical-align: middle;
12 }
13
14 .roo-select2-container,
15 .roo-select2-drop,
16 .roo-select2-search,
17 .roo-select2-search input {
18   /*
19     Force border-box so that % widths fit the parent
20     container without overlap because of margin/padding.
21     More Info : http://www.quirksmode.org/css/box.html
22   */
23   -webkit-box-sizing: border-box; /* webkit */
24      -moz-box-sizing: border-box; /* firefox */
25           box-sizing: border-box; /* css3 */
26 }
27
28 .roo-select2-container .roo-select2-choice {
29     display: block;
30     height: 26px;
31     padding: 0 0 0 8px;
32     overflow: hidden;
33     position: relative;
34
35     border: 1px solid $gray-light; //#aaa;
36     white-space: nowrap;
37     line-height: 26px;
38     color: $gray-dark; //#444;
39     text-decoration: none;
40
41     border-radius: 4px;
42
43     background-clip: padding-box;
44
45     -webkit-touch-callout: none;
46       -webkit-user-select: none;
47          -moz-user-select: none;
48           -ms-user-select: none;
49               user-select: none;
50
51     background-color: $body-bg;
52     background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, $gray-lighter), color-stop(0.5, $body-bg));
53     background-image: -webkit-linear-gradient(center bottom, $gray-lighter 0%, $body-bg 50%);
54     background-image: -moz-linear-gradient(center bottom, $gray-lighter 0%, $body-bg 50%);
55     filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '$body-bg', endColorstr = '$gray-lighter', GradientType = 0);
56     background-image: linear-gradient(to top, $gray-lighter 0%, $body-bg 50%);
57 }
58
59 .roo-select2-container.roo-select2-drop-above .roo-select2-choice {
60     border-bottom-color: $gray-light; //#aaa;
61
62     border-radius: 0 0 4px 4px;
63
64     background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, $gray-lighter), color-stop(0.9, $body-bg));
65     background-image: -webkit-linear-gradient(center bottom, $gray-lighter 0%, $body-bg 90%);
66     background-image: -moz-linear-gradient(center bottom, $gray-lighter 0%, $body-bg 90%);
67     filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='$body-bg', endColorstr='$gray-lighter', GradientType=0);
68     background-image: linear-gradient(to bottom, $gray-lighter 0%, $body-bg 90%);
69 }
70
71 .roo-select2-container.roo-select2-allowclear .roo-select2-choice .roo-select2-chosen {
72     margin-right: 42px;
73 }
74
75 .roo-select2-container .roo-select2-choice > .roo-select2-chosen {
76     margin-right: 26px;
77     display: block;
78     overflow: hidden;
79
80     white-space: nowrap;
81
82     text-overflow: ellipsis;
83     float: none;
84     width: auto;
85 }
86
87 .roo-select2-container .roo-select2-choice abbr {
88     display: none;
89     width: 12px;
90     height: 12px;
91     position: absolute;
92     right: 24px;
93     top: 8px;
94
95     font-size: 1px;
96     text-decoration: none;
97
98     border: 0;
99     background: url('#{$bootstrap-image-path}/select2/select2.png') right top no-repeat;
100     cursor: pointer;
101     outline: 0;
102 }
103
104 .roo-select2-container.roo-select2-allowclear .roo-select2-choice abbr {
105     display: inline-block;
106 }
107
108 .roo-select2-container .roo-select2-choice abbr:hover {
109     background-position: right -11px;
110     cursor: pointer;
111 }
112
113 .roo-select2-drop-mask {
114     border: 0;
115     margin: 0;
116     padding: 0;
117     position: fixed;
118     left: 0;
119     top: 0;
120     min-height: 100%;
121     min-width: 100%;
122     height: auto;
123     width: auto;
124     opacity: 0;
125     z-index: 9998;
126     /* styles required for IE to work */
127     background-color: $body-bg;
128     filter: alpha(opacity=0);
129 }
130
131 .roo-select2-drop {
132     width: 100%;
133     margin-top: -1px;
134     position: absolute;
135     z-index: 9999;
136     top: 100%;
137
138     background: $body-bg;
139     color: $gray-base;
140     border: 1px solid $gray-light;
141     border-top: 0;
142
143     border-radius: 0 0 4px 4px;
144
145     -webkit-box-shadow: 0 4px 5px $black-opacity-20;
146             box-shadow: 0 4px 5px $black-opacity-20;
147 }
148
149 .roo-select2-drop.roo-select2-drop-above {
150     margin-top: 1px;
151     border-top: 1px solid $gray-light; //#aaa;
152     border-bottom: 0;
153
154     border-radius: 4px 4px 0 0;
155
156     -webkit-box-shadow: 0 -4px 5px $black-opacity-20;
157             box-shadow: 0 -4px 5px $black-opacity-20;
158 }
159
160 .roo-select2-drop-active {
161     border: 1px solid $brand-primary; //#5897fb;
162     border-top: none;
163 }
164
165 .roo-select2-drop.roo-select2-drop-above.roo-select2-drop-active {
166     border-top: 1px solid $brand-primary; //#5897fb;
167 }
168
169 .roo-select2-drop-auto-width {
170     border-top: 1px solid $gray-light; //#aaa;
171     width: auto;
172 }
173
174 .roo-select2-drop-auto-width .roo-select2-search {
175     padding-top: 4px;
176 }
177
178 .roo-select2-container .roo-select2-choice .roo-select2-arrow {
179     display: inline-block;
180     width: 18px;
181     height: 100%;
182     position: absolute;
183     right: 0;
184     top: 0;
185
186     border-left: 1px solid $gray-light; //#aaa;
187     border-radius: 0 4px 4px 0;
188
189     background-clip: padding-box;
190
191     background: $gray-light;
192     background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, $gray-light), color-stop(0.6, $gray-lighter));
193     background-image: -webkit-linear-gradient(center bottom, $gray-light 0%, $gray-lighter 60%);
194     background-image: -moz-linear-gradient(center bottom, $gray-light 0%, $gray-lighter 60%);
195     filter: progid:DXImageTransform.Microsoft.gradient(startColorstr = '$gray-lighter', endColorstr = '$gray-light', GradientType = 0);
196     background-image: linear-gradient(to top, $gray-light 0%, $gray-lighter 60%);
197 }
198
199 .roo-select2-container .roo-select2-choice .roo-select2-arrow b {
200     display: block;
201     width: 100%;
202     height: 100%;
203     background: url('#{$bootstrap-image-path}/select2/select2.png') no-repeat 0 1px;
204 }
205
206 .roo-select2-search {
207     display: inline-block;
208     width: 100%;
209     min-height: 26px;
210     margin: 0;
211     padding-left: 4px;
212     padding-right: 4px;
213
214     position: relative;
215     z-index: 10000;
216
217     white-space: nowrap;
218 }
219
220 .roo-select2-search input {
221     width: 100%;
222     height: auto !important;
223     min-height: 26px;
224     padding: 4px 20px 4px 5px;
225     margin: 0;
226
227     outline: 0;
228     font-family: sans-serif;
229     font-size: 1em;
230
231     border: 1px solid $gray-light;
232     border-radius: 0;
233
234     -webkit-box-shadow: none;
235             box-shadow: none;
236
237     background: $body-bg url('#{$bootstrap-image-path}/select2/select2.png') no-repeat 100% -22px;
238     background: url('#{$bootstrap-image-path}/select2/select2.png') no-repeat 100% -22px, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, $body-bg), color-stop(0.99, $gray-lighter));
239     background: url('#{$bootstrap-image-path}/select2/select2.png') no-repeat 100% -22px, -webkit-linear-gradient(center bottom, $body-bg 85%, $gray-lighter 99%);
240     background: url('#{$bootstrap-image-path}/select2/select2.png') no-repeat 100% -22px, -moz-linear-gradient(center bottom, $body-bg 85%, $gray-lighter 99%);
241     background: url('#{$bootstrap-image-path}/select2/select2.png') no-repeat 100% -22px, linear-gradient(to bottom, $body-bg 85%, $gray-lighter 99%) 0 0;
242 }
243
244 .roo-select2-drop.roo-select2-drop-above .roo-select2-search input {
245     margin-top: 4px;
246 }
247
248 .roo-select2-search input.roo-select2-active {
249     background: $body-bg url('#{$bootstrap-image-path}/select2/select2-spinner.gif') no-repeat 100%;
250     background: url('#{$bootstrap-image-path}/select2/select2-spinner.gif') no-repeat 100%, -webkit-gradient(linear, left bottom, left top, color-stop(0.85, $body-bg), color-stop(0.99, $gray-lighter));
251     background: url('#{$bootstrap-image-path}/select2/select2-spinner.gif') no-repeat 100%, -webkit-linear-gradient(center bottom, $body-bg 85%, $gray-lighter 99%);
252     background: url('#{$bootstrap-image-path}/select2/select2-spinner.gif') no-repeat 100%, -moz-linear-gradient(center bottom, $body-bg 85%, $gray-lighter 99%);
253     background: url('#{$bootstrap-image-path}/select2/select2-spinner.gif') no-repeat 100%, linear-gradient(to bottom, $body-bg 85%, $gray-lighter 99%) 0 0;
254 }
255
256 .roo-select2-container-active .roo-select2-choice,
257 .roo-select2-container-active .roo-select2-choices {
258     border: 1px solid $brand-primary; //#5897fb;
259     outline: none;
260
261     -webkit-box-shadow: 0 0 5px $black-opacity-50;
262             box-shadow: 0 0 5px $black-opacity-50;
263 }
264
265 .roo-select2-dropdown-open .roo-select2-choice {
266     border-bottom-color: transparent;
267     -webkit-box-shadow: 0 1px 0 $body-bg inset;
268             box-shadow: 0 1px 0 $body-bg inset;
269
270     border-bottom-left-radius: 0;
271     border-bottom-right-radius: 0;
272
273     background-color: $gray-lighter;
274     background-image: -webkit-gradient(linear, left bottom, left top, color-stop(0, $body-bg), color-stop(0.5, $gray-lighter));
275     background-image: -webkit-linear-gradient(center bottom, $body-bg 0%, $gray-lighter 50%);
276     background-image: -moz-linear-gradient(center bottom, $body-bg 0%, $gray-lighter 50%);
277     filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='$gray-lighter', endColorstr='$body-bg', GradientType=0);
278     background-image: linear-gradient(to top, $body-bg 0%, $gray-lighter 50%);
279 }
280
281 .roo-select2-dropdown-open.roo-select2-drop-above .roo-select2-choice,
282 .roo-select2-dropdown-open.roo-select2-drop-above .roo-select2-choices {
283     border: 1px solid $brand-primary; //#5897fb;
284     border-top-color: transparent;
285
286     background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, $body-bg), color-stop(0.5, $gray-lighter));
287     background-image: -webkit-linear-gradient(center top, $body-bg 0%, $gray-lighter 50%);
288     background-image: -moz-linear-gradient(center top, $body-bg 0%, $gray-lighter 50%);
289     filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='$gray-lighter', endColorstr='$body-bg', GradientType=0);
290     background-image: linear-gradient(to bottom, $body-bg 0%, $gray-lighter 50%);
291 }
292
293 .roo-select2-dropdown-open .roo-select2-choice .roo-select2-arrow {
294     background: transparent;
295     border-left: none;
296     filter: none;
297 }
298 .roo-select2-dropdown-open .roo-select2-choice .roo-select2-arrow b {
299     background-position: -18px 1px;
300 }
301
302 .roo-select2-hidden-accessible {
303     border: 0;
304     clip: rect(0 0 0 0);
305     height: 1px;
306     margin: -1px;
307     overflow: hidden;
308     padding: 0;
309     position: absolute;
310     width: 1px;
311 }
312
313 /* results */
314 .roo-select2-results {
315     max-height: 200px;
316     padding: 0 0 0 4px;
317     margin: 4px 4px 4px 0;
318     position: relative;
319     overflow-x: hidden;
320     overflow-y: auto;
321     -webkit-tap-highlight-color: fade($gray-base, 0%);
322 }
323
324 .roo-select2-results ul.roo-select2-result-sub {
325     margin: 0;
326     padding-left: 0;
327 }
328
329 .roo-select2-results li {
330     list-style: none;
331     display: list-item;
332     background-image: none;
333 }
334
335 .roo-select2-results li.roo-select2-result-with-children > .roo-select2-result-label {
336     font-weight: bold;
337 }
338
339 .roo-select2-results .roo-select2-result-label {
340     padding: 3px 7px 4px;
341     margin: 0;
342     cursor: pointer;
343
344     min-height: 1em;
345
346     -webkit-touch-callout: none;
347       -webkit-user-select: none;
348          -moz-user-select: none;
349           -ms-user-select: none;
350               user-select: none;
351 }
352
353 .roo-select2-results-dept-1 .roo-select2-result-label { padding-left: 20px }
354 .roo-select2-results-dept-2 .roo-select2-result-label { padding-left: 40px }
355 .roo-select2-results-dept-3 .roo-select2-result-label { padding-left: 60px }
356 .roo-select2-results-dept-4 .roo-select2-result-label { padding-left: 80px }
357 .roo-select2-results-dept-5 .roo-select2-result-label { padding-left: 100px }
358 .roo-select2-results-dept-6 .roo-select2-result-label { padding-left: 110px }
359 .roo-select2-results-dept-7 .roo-select2-result-label { padding-left: 120px }
360
361 .roo-select2-results .roo-select2-highlighted {
362     background: $brand-primary; //#3875d7;
363     color: $body-bg;
364 }
365
366 .roo-select2-results li em {
367     background: $brand-warning;
368     font-style: normal;
369 }
370
371 .roo-select2-results .roo-select2-highlighted em {
372     background: transparent;
373 }
374
375 .roo-select2-results .roo-select2-highlighted ul {
376     background: $body-bg;
377     color: $gray-base;
378 }
379
380
381 .roo-select2-results .roo-select2-no-results,
382 .roo-select2-results .roo-select2-searching,
383 .roo-select2-results .roo-select2-selection-limit {
384     background: $gray-light; //#f4f4f4;
385     display: list-item;
386     padding-left: 5px;
387 }
388
389 /*
390 disabled look for disabled choices in the results dropdown
391 */
392 .roo-select2-results .roo-select2-disabled.roo-select2-highlighted {
393     color: $gray-lighter; //#666;
394     background: $gray-light; //#f4f4f4;
395     display: list-item;
396     cursor: default;
397 }
398 .roo-select2-results .roo-select2-disabled {
399   background: $gray-light; //#f4f4f4;
400   display: list-item;
401   cursor: default;
402 }
403
404 .roo-select2-results .roo-select2-selected {
405     display: none;
406 }
407
408 .roo-select2-more-results.roo-select2-active {
409     background: $gray-light url('#{$bootstrap-image-path}/select2/select2-spinner.gif') no-repeat 100%;
410 }
411
412 .roo-select2-more-results {
413     background: $gray-light; //#f4f4f4;
414     display: list-item;
415 }
416
417 /* disabled styles */
418
419 .roo-select2-container.roo-select2-container-disabled .roo-select2-choice {
420     background-color: $gray-light; //#f4f4f4;
421     background-image: none;
422     border: 1px solid $gray-light;
423     cursor: default;
424 }
425
426 .roo-select2-container.roo-select2-container-disabled .roo-select2-choice .roo-select2-arrow {
427     background-color: $gray-light; //#f4f4f4;
428     background-image: none;
429     border-left: 0;
430 }
431
432 .roo-select2-container.roo-select2-container-disabled .roo-select2-choice abbr {
433     display: none;
434 }
435
436
437 /* multiselect */
438
439 .roo-select2-container-multi .roo-select2-choices {
440     height: auto !important;
441     height: 1%;
442     margin: 0;
443     padding: 0;
444     width: 100%; /* needed on BS4? */
445     /*position: relative;*/
446     border: 1px solid $gray-light;
447     cursor: text;
448     overflow: hidden;
449     background-color: $body-bg;
450     background-image: -webkit-gradient(linear, 0% 0%, 0% 100%, color-stop(1%, $gray-lighter), color-stop(15%, $body-bg));
451     background-image: -webkit-linear-gradient(top, $gray-lighter 1%, $body-bg 15%);
452     background-image: -moz-linear-gradient(top, $gray-lighter 1%, $body-bg 15%);
453     background-image: linear-gradient(to bottom, $gray-lighter 1%, $body-bg 15%);
454 }
455
456 .roo-select2-locked {
457   padding: 3px 5px 3px 5px !important;
458 }
459
460 .roo-select2-container-multi .roo-select2-choices {
461     min-height: 26px;
462 }
463
464 .roo-select2-container-multi.roo-select2-container-active .roo-select2-choices {
465     border: 1px solid $brand-primary;
466     outline: none;
467
468     -webkit-box-shadow: 0 0 5px $black-opacity-50;
469             box-shadow: 0 0 5px $black-opacity-50;
470 }
471 .roo-select2-container-multi .roo-select2-choices li {
472     float: left;
473     list-style: none;
474 }
475 html[dir="rtl"] .roo-select2-container-multi .roo-select2-choices li
476 {
477     float: right;
478 }
479 .roo-select2-container-multi .roo-select2-choices .roo-select2-search-field {
480     margin: 0;
481     padding: 0;
482     white-space: nowrap;
483 }
484
485 .roo-select2-container-multi .roo-select2-choices .roo-select2-search-field input {
486     padding: 5px;
487     margin: 1px 0;
488
489     font-family: sans-serif;
490     font-size: 100%;
491     color: $gray; //#666;
492     outline: 0;
493     border: 0;
494     -webkit-box-shadow: none;
495             box-shadow: none;
496     background: transparent !important;
497 }
498
499 .roo-select2-container-multi .roo-select2-choices .roo-select2-search-field input.roo-select2-active {
500     background: $body-bg url('#{$bootstrap-image-path}/select2/select2-spinner.gif') no-repeat 100% !important;
501 }
502
503 .roo-select2-default {
504     color: $gray-light !important;
505 }
506
507 .roo-select2-container-multi .roo-select2-choices .roo-select2-search-choice {
508     
509     
510     padding: 4px 7px 4px 16px;
511     margin: 0 1px;
512     position: relative;
513     line-height: 13px;
514     color: $gray-dark;
515     cursor: default;
516     border: 1px solid $gray-light;
517     border-radius: 3px;
518   
519     -webkit-touch-callout: none;
520     -webkit-user-select: none;
521     -moz-user-select: none;
522     -ms-user-select: none;
523     user-select: none;
524 }
525   
526  
527 html[dir="rtl"] .roo-select2-container-multi .roo-select2-choices .roo-select2-search-choice
528 {
529     margin-left: 0;
530     margin-right: 5px;
531 }
532 .roo-select2-container-multi .roo-select2-choices .roo-select2-search-choice .roo-select2-chosen {
533     cursor: default;
534 }
535 .roo-select2-container-multi .roo-select2-choices .roo-select2-search-choice-focus {
536     background: $gray-light; //#d4d4d4;
537 }
538
539 .roo-select2-search-choice-close {
540     display: block;
541     width: 12px;
542     height: 13px;
543     position: absolute;
544     right: 3px;
545     top: 4px;
546     font-size: 12px;
547     outline: none;
548     color: $gray-light;
549     /*background: url('#{$bootstrap-image-path}/select2/select2.png') right top no-repeat;*/
550 }
551
552 .roo-select2-search-choice-close:hover {
553     color: $gray-dark;
554 }
555
556 html[dir="rtl"] .roo-select2-search-choice-close {
557     right: auto;
558     left: 3px;
559 }
560
561 .roo-select2-container-multi .roo-select2-search-choice-close {
562     left: 3px;
563 }
564
565 .roo-select2-container-multi .roo-select2-choices .roo-select2-search-choice .roo-select2-search-choice-close:hover {
566   background-position: right -11px;
567 }
568 .roo-select2-container-multi .roo-select2-choices .roo-select2-search-choice-focus .roo-select2-search-choice-close {
569     background-position: right -11px;
570 }
571
572 /* disabled styles */
573 .roo-select2-container-multi.roo-select2-container-disabled .roo-select2-choices {
574     background-color: $gray-light; //#f4f4f4;
575     background-image: none;
576     border: 1px solid $gray-light;
577     cursor: default;
578 }
579
580 .roo-select2-container-multi.roo-select2-container-disabled .roo-select2-choices .roo-select2-search-choice {
581     padding: 3px 5px 3px 5px;
582     border: 1px solid $gray-light;
583     background-image: none;
584     background-color: $gray-light; //#f4f4f4;
585 }
586
587 .roo-select2-container-multi.roo-select2-container-disabled .roo-select2-choices .roo-select2-search-choice .roo-select2-search-choice-close {    display: none;
588     background: none;
589 }
590 /* end multiselect */
591
592
593 .roo-select2-result-selectable .roo-select2-match,
594 .roo-select2-result-unselectable .roo-select2-match {
595     text-decoration: underline;
596 }
597
598 .roo-select2-offscreen, .roo-select2-offscreen:focus {
599     clip: rect(0 0 0 0) !important;
600     width: 1px !important;
601     height: 1px !important;
602     border: 0 !important;
603     margin: 0 !important;
604     padding: 0 !important;
605     overflow: hidden !important;
606     position: absolute !important;
607     outline: 0 !important;
608     left: 0px !important;
609     top: 0px !important;
610 }
611
612 .roo-select2-display-none {
613     display: none;
614 }
615
616 .roo-select2-measure-scrollbar {
617     position: absolute;
618     top: -10000px;
619     left: -10000px;
620     width: 100px;
621     height: 100px;
622     overflow: scroll;
623 }
624
625 /* Retina-ize icons */
626
627 @media only screen and (-webkit-min-device-pixel-ratio: 1.5), only screen and (min-resolution: 2dppx)  {
628     .roo-select2-search input,
629     .roo-select2-search-choice-close,
630     .roo-select2-container .roo-select2-choice abbr,
631     .roo-select2-container .roo-select2-choice .roo-select2-arrow b {
632         background-image: url('#{$bootstrap-image-path}/select2/select2x2.png') !important;
633         background-repeat: no-repeat !important;
634         background-size: 60px 40px !important;
635     }
636
637     .roo-select2-search input {
638         background-position: 100% -21px !important;
639     }
640 }
641
642 .has-error .roo-select2-choices {
643     border-color: $brand-danger; //#a94442;
644     -webkit-box-shadow: inset 0 1px 1px $black-opacity-80;
645     box-shadow: inset 0 1px 1px $black-opacity-80;
646 }
647
648 .dropdown-menu .roo-select2-result.disabled {
649     background-color: $gray-lighter;
650     color: $gray-light;
651     cursor: not-allowed;
652 }