1 | // Select
|
---|
2 | //
|
---|
3 | // Replaces the browser default select with a custom one, mostly pulled from
|
---|
4 | // https://primer.github.io/.
|
---|
5 |
|
---|
6 | .form-select {
|
---|
7 | display: block;
|
---|
8 | width: 100%;
|
---|
9 | padding: $form-select-padding-y $form-select-indicator-padding $form-select-padding-y $form-select-padding-x;
|
---|
10 | -moz-padding-start: subtract($form-select-padding-x, 3px); // See https://github.com/twbs/bootstrap/issues/32636
|
---|
11 | font-family: $form-select-font-family;
|
---|
12 | @include font-size($form-select-font-size);
|
---|
13 | font-weight: $form-select-font-weight;
|
---|
14 | line-height: $form-select-line-height;
|
---|
15 | color: $form-select-color;
|
---|
16 | background-color: $form-select-bg;
|
---|
17 | background-image: escape-svg($form-select-indicator);
|
---|
18 | background-repeat: no-repeat;
|
---|
19 | background-position: $form-select-bg-position;
|
---|
20 | background-size: $form-select-bg-size;
|
---|
21 | border: $form-select-border-width solid $form-select-border-color;
|
---|
22 | @include border-radius($form-select-border-radius, 0);
|
---|
23 | @include box-shadow($form-select-box-shadow);
|
---|
24 | @include transition($form-select-transition);
|
---|
25 | appearance: none;
|
---|
26 |
|
---|
27 | &:focus {
|
---|
28 | border-color: $form-select-focus-border-color;
|
---|
29 | outline: 0;
|
---|
30 | @if $enable-shadows {
|
---|
31 | @include box-shadow($form-select-box-shadow, $form-select-focus-box-shadow);
|
---|
32 | } @else {
|
---|
33 | // Avoid using mixin so we can pass custom focus shadow properly
|
---|
34 | box-shadow: $form-select-focus-box-shadow;
|
---|
35 | }
|
---|
36 | }
|
---|
37 |
|
---|
38 | &[multiple],
|
---|
39 | &[size]:not([size="1"]) {
|
---|
40 | padding-right: $form-select-padding-x;
|
---|
41 | background-image: none;
|
---|
42 | }
|
---|
43 |
|
---|
44 | &:disabled {
|
---|
45 | color: $form-select-disabled-color;
|
---|
46 | background-color: $form-select-disabled-bg;
|
---|
47 | border-color: $form-select-disabled-border-color;
|
---|
48 | }
|
---|
49 |
|
---|
50 | // Remove outline from select box in FF
|
---|
51 | &:-moz-focusring {
|
---|
52 | color: transparent;
|
---|
53 | text-shadow: 0 0 0 $form-select-color;
|
---|
54 | }
|
---|
55 | }
|
---|
56 |
|
---|
57 | .form-select-sm {
|
---|
58 | padding-top: $form-select-padding-y-sm;
|
---|
59 | padding-bottom: $form-select-padding-y-sm;
|
---|
60 | padding-left: $form-select-padding-x-sm;
|
---|
61 | @include font-size($form-select-font-size-sm);
|
---|
62 | @include border-radius($form-select-border-radius-sm);
|
---|
63 | }
|
---|
64 |
|
---|
65 | .form-select-lg {
|
---|
66 | padding-top: $form-select-padding-y-lg;
|
---|
67 | padding-bottom: $form-select-padding-y-lg;
|
---|
68 | padding-left: $form-select-padding-x-lg;
|
---|
69 | @include font-size($form-select-font-size-lg);
|
---|
70 | @include border-radius($form-select-border-radius-lg);
|
---|
71 | }
|
---|