|
| 1 | +// ************************************* |
| 2 | +// |
| 3 | +// Select |
| 4 | +// -> Menu input |
| 5 | +// |
| 6 | +// Dependencies: .form |
| 7 | +// |
| 8 | +// ------------------------------------- |
| 9 | +// Template (Haml) |
| 10 | +// ------------------------------------- |
| 11 | +// |
| 12 | +// .select |
| 13 | +// %input.select-input |
| 14 | +// %option.select-input-option |
| 15 | +// |
| 16 | +// ************************************* |
| 17 | +
|
| 18 | +.select |
| 19 | + border-radius: $select-borderRadius |
| 20 | + border: $b-borderWidth $b-borderStyle darken($c-border, 8%) |
| 21 | + color: $select-color |
| 22 | + display: block |
| 23 | + font-family: $b-fontFamily |
| 24 | + font-size: $b-fontSize |
| 25 | + position: relative |
| 26 | + |
| 27 | + &::after |
| 28 | + border-bottom: $select-caret-size solid transparent |
| 29 | + border-left: $select-caret-size solid transparent |
| 30 | + border-right: $select-caret-size solid transparent |
| 31 | + border-top: $select-caret-size solid |
| 32 | + content: '' |
| 33 | + display: inline-block |
| 34 | + height: 0 |
| 35 | + line-height: 1 |
| 36 | + pointer-events: none |
| 37 | + position: absolute |
| 38 | + right: $b-space |
| 39 | + top: calc(50% - 2px) // FIXME: Magic number! |
| 40 | + width: 0 |
| 41 | + |
| 42 | +// ------------------------------------- |
| 43 | +// Scaffolding |
| 44 | +// ------------------------------------- |
| 45 | +
|
| 46 | +// ----- Input ----- // |
| 47 | +
|
| 48 | +.select-input |
| 49 | + -moz-appearance: none |
| 50 | + -webkit-appearance: none |
| 51 | + appearance: none |
| 52 | + background-color: $select-background |
| 53 | + border-radius: $select-borderRadius |
| 54 | + border: 0 |
| 55 | + box-shadow: none |
| 56 | + box-sizing: border-box |
| 57 | + color: $select-color |
| 58 | + cursor: pointer |
| 59 | + display: block |
| 60 | + line-height: $form-shared-lineHeight |
| 61 | + margin: 0 |
| 62 | + outline: 0 |
| 63 | + padding: $b-space-s $b-space |
| 64 | + width: 100% |
| 65 | + |
| 66 | + &:focus |
| 67 | + border-color: $c-highlight |
| 68 | + |
| 69 | + &:-moz-focusring |
| 70 | + color: transparent |
| 71 | + text-shadow: 0 0 0 $select-color |
| 72 | + |
| 73 | +// ------------------------------------- |
| 74 | +// Browser Support |
| 75 | +// ------------------------------------- |
| 76 | +
|
| 77 | +// ----- Internet Explorer ----- // |
| 78 | +
|
| 79 | +// IE9+ |
| 80 | +
|
| 81 | +@media screen and (min-width:0\0) |
| 82 | + |
| 83 | + .select::after |
| 84 | + display: none |
| 85 | + |
| 86 | +// IE10+ |
| 87 | +
|
| 88 | +.select-input::-ms-expand |
| 89 | + display: none |
| 90 | + |
| 91 | +@media all and (-ms-high-contrast: none), (-ms-high-contrast: active) |
| 92 | + |
| 93 | + .select::after |
| 94 | + display: inline-block |
0 commit comments