|
| 1 | +/** |
| 2 | +* |
| 3 | +* Copyright 2012 Adobe Systems Inc.; |
| 4 | +* |
| 5 | +* Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | +* you may not use this file except in compliance with the License. |
| 7 | +* You may obtain a copy of the License at |
| 8 | +* |
| 9 | +* http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +* |
| 11 | +* Unless required by applicable law or agreed to in writing, software |
| 12 | +* distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | +* See the License for the specific language governing permissions and |
| 15 | +* limitations under the License. |
| 16 | +* |
| 17 | +*/ |
| 18 | +.topcoat-select { |
| 19 | + padding: 0; |
| 20 | + margin: 0; |
| 21 | + font: inherit; |
| 22 | + color: inherit; |
| 23 | + background: transparent; |
| 24 | + border: none; |
| 25 | +} |
| 26 | + |
| 27 | +.topcoat-select { |
| 28 | + vertical-align: top; |
| 29 | + outline: none; |
| 30 | +} |
| 31 | + |
| 32 | +.topcoat-select { |
| 33 | + cursor: default; |
| 34 | + -webkit-user-select: none; |
| 35 | + -moz-user-select: none; |
| 36 | + -ms-user-select: none; |
| 37 | + user-select: none; |
| 38 | +} |
| 39 | + |
| 40 | +.topcoat-select { |
| 41 | + -moz-box-sizing: border-box; |
| 42 | + box-sizing: border-box; |
| 43 | + background-clip: padding-box; |
| 44 | +} |
| 45 | + |
| 46 | +.topcoat-select { |
| 47 | + position: relative; |
| 48 | + display: inline-block; |
| 49 | + vertical-align: top; |
| 50 | +} |
| 51 | + |
| 52 | +.topcoat-select:disabled { |
| 53 | + opacity: 0.3; |
| 54 | + cursor: default; |
| 55 | + pointer-events: none; |
| 56 | +} |
| 57 | + |
| 58 | +.topcoat-select { |
| 59 | + -moz-appearance: none; |
| 60 | + -webkit-appearance: none; |
| 61 | +} |
| 62 | + |
| 63 | +.topcoat-select::-ms-expand { |
| 64 | + display: none; |
| 65 | +} |
| 66 | + |
| 67 | +/* topdoc |
| 68 | + name: Topcoat Select |
| 69 | + description: A component that lets you select things |
| 70 | + modifiers: |
| 71 | + :disabled: Disabled state |
| 72 | + :focus: Focused |
| 73 | + :invalid: Hover state |
| 74 | + markup: |
| 75 | + <select class="topcoat-select"> |
| 76 | + <option value="volvo">Volvo</option> |
| 77 | + <option value="saab">Saab</option> |
| 78 | + <option value="mercedes">Mercedes</option> |
| 79 | + <option value="audi">Audi</option> |
| 80 | + </select> |
| 81 | + <select class="topcoat-select" disabled> |
| 82 | + <option value="volvo">Volvo</option> |
| 83 | + <option value="saab">Saab</option> |
| 84 | + <option value="mercedes">Mercedes</option> |
| 85 | + <option value="audi">Audi</option> |
| 86 | + </select> |
| 87 | + tags: |
| 88 | + - desktop |
| 89 | + - mobile |
| 90 | + - text |
| 91 | + - input |
| 92 | +*/ |
| 93 | + |
| 94 | +.topcoat-select { |
| 95 | + -webkit-user-select: none; |
| 96 | + -moz-user-select: none; |
| 97 | + -ms-user-select: none; |
| 98 | + user-select: none; |
| 99 | + cursor: pointer; |
| 100 | + appearance: button; |
| 101 | + text-indent: 0.01px; |
| 102 | + text-overflow: ''; |
| 103 | + padding: .06rem 1.4rem .06rem 0.4rem; |
| 104 | + font-size: 12px; |
| 105 | + font-weight: 400; |
| 106 | + height: 1.313rem; |
| 107 | + letter-spacing: 0; |
| 108 | + color: hsla(0, 0%, 27%, 1); |
| 109 | + text-shadow: 0 1px hsla(0, 100%, 100%, 1); |
| 110 | + border-radius: 4px; |
| 111 | + background-color: hsla(165, 8%, 91%, 1); |
| 112 | + box-shadow: inset 0 1px hsla(0, 100%, 100%, 1); |
| 113 | + border: 1px solid hsla(168, 8%, 65%, 1); |
| 114 | + background-image: url('img/dropdown.svg'); |
| 115 | + background-repeat: no-repeat; |
| 116 | + background-position: center right; |
| 117 | + min-width: 3.4rem; |
| 118 | +} |
| 119 | + |
| 120 | +.topcoat-select:hover { |
| 121 | + background-color: hsla(180, 7%, 94%, 1); |
| 122 | +} |
| 123 | + |
| 124 | +.topcoat-select:active { |
| 125 | + background-color: hsla(180, 5%, 83%, 1); |
| 126 | + box-shadow: inset 0 1px hsla(0, 0%, 0%, 0.1); |
| 127 | +} |
| 128 | + |
| 129 | +.topcoat-select:focus { |
| 130 | + border: 1px solid hsla(227, 100%, 50%, 1); |
| 131 | + box-shadow: 0 0 0 2px hsla(208, 82%, 69%, 1); |
| 132 | + outline: 0; |
| 133 | +} |
| 134 | +.dark .topcoat-select { |
| 135 | + color: hsla(180, 2%, 78%, 1); |
| 136 | + text-shadow: 0 -1px hsla(0, 0%, 0%, 0.69); |
| 137 | + background-color: hsla(180, 1%, 35%, 1); |
| 138 | + box-shadow: inset 0 1px hsla(0, 0%, 45%, 1); |
| 139 | + border: 1px solid hsla(180, 1%, 20%, 1); |
| 140 | +} |
| 141 | +.dark .topcoat-select:hover { |
| 142 | + background-color: hsla(200, 2%, 39%, 1); |
| 143 | +} |
| 144 | +.dark .topcoat-select:active { |
| 145 | + background-color: hsla(210, 2%, 25%, 1); |
| 146 | + box-shadow: inset 0 1px hsla(0, 0%, 0%, 0.05); |
| 147 | +} |
| 148 | +@media screen and (max-width: 650px) { |
| 149 | + .topcoat-select { |
| 150 | + color: hsla(180, 2%, 78%, 1); |
| 151 | + text-shadow: 0 -1px hsla(0, 0%, 0%, 0.69); |
| 152 | + background-color: hsla(180, 1%, 35%, 1); |
| 153 | + box-shadow: inset 0 1px hsla(0, 0%, 45%, 1); |
| 154 | + border: 1px solid hsla(180, 1%, 20%, 1); |
| 155 | + padding: 0.7rem 1.4rem 0.7rem 1rem; |
| 156 | + font-size: 16px; |
| 157 | + height: 3rem; |
| 158 | + letter-spacing: 1px; |
| 159 | + border-radius: 6px; |
| 160 | + } |
| 161 | + .topcoat-select:hover { |
| 162 | + background-color: hsla(200, 2%, 39%, 1); |
| 163 | + } |
| 164 | + .topcoat-select:active { |
| 165 | + background-color: hsla(210, 2%, 25%, 1); |
| 166 | + box-shadow: inset 0 1px hsla(0, 0%, 0%, 0.05); |
| 167 | + } |
| 168 | +} |
| 169 | + |
| 170 | + |
| 171 | + |
0 commit comments