OLD | NEW |
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 * Use of this source code is governed by a BSD-style license that can be | 2 * Use of this source code is governed by a BSD-style license that can be |
3 * found in the LICENSE file. */ | 3 * found in the LICENSE file. */ |
4 | 4 |
5 /* This file defines styles for form controls. The order of rule blocks is | 5 /* This file defines styles for form controls. The order of rule blocks is |
6 * important as there are some rules with equal specificity that rely on order | 6 * important as there are some rules with equal specificity that rely on order |
7 * as a tiebreaker. These are marked with OVERRIDE. */ | 7 * as a tiebreaker. These are marked with OVERRIDE. */ |
8 | 8 |
9 @import url(action_link.css); | 9 @import url(action_link.css); |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... |
29 text-shadow: 0 1px 0 rgb(240, 240, 240); | 29 text-shadow: 0 1px 0 rgb(240, 240, 240); |
30 user-select: none; | 30 user-select: none; |
31 } | 31 } |
32 | 32 |
33 :-webkit-any(button, | 33 :-webkit-any(button, |
34 input[type='button'], | 34 input[type='button'], |
35 input[type='submit']):not(.custom-appearance), | 35 input[type='submit']):not(.custom-appearance), |
36 select { | 36 select { |
37 min-height: 2em; | 37 min-height: 2em; |
38 min-width: 4em; | 38 min-width: 4em; |
39 padding-top: 1px; | |
40 padding-bottom: 1px; | 39 padding-bottom: 1px; |
41 <if expr="is_win or is_macosx"> | 40 <if expr="is_win or is_macosx"> |
42 /* The following platform-specific rule is necessary to get adjacent | 41 /* The following platform-specific rule is necessary to get adjacent |
43 * buttons, text inputs, and so forth to align on their borders while also | 42 * buttons, text inputs, and so forth to align on their borders while also |
44 * aligning on the text's baselines. */ | 43 * aligning on the text's baselines. */ |
45 padding-bottom: 2px; | 44 padding-bottom: 2px; |
46 </if> | 45 </if> |
| 46 padding-top: 1px; |
47 } | 47 } |
48 | 48 |
49 :-webkit-any(button, | 49 :-webkit-any(button, |
50 input[type='button'], | 50 input[type='button'], |
51 input[type='submit']):not(.custom-appearance) { | 51 input[type='submit']):not(.custom-appearance) { |
52 -webkit-padding-end: 10px; | 52 -webkit-padding-end: 10px; |
53 -webkit-padding-start: 10px; | 53 -webkit-padding-start: 10px; |
54 } | 54 } |
55 | 55 |
56 select { | 56 select { |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 input:not([type]), | 93 input:not([type]), |
94 textarea { | 94 textarea { |
95 border: 1px solid #bfbfbf; | 95 border: 1px solid #bfbfbf; |
96 border-radius: 2px; | 96 border-radius: 2px; |
97 box-sizing: border-box; | 97 box-sizing: border-box; |
98 color: #444; | 98 color: #444; |
99 font: inherit; | 99 font: inherit; |
100 margin: 0; | 100 margin: 0; |
101 /* Use min-height to accommodate addditional padding for touch as needed. */ | 101 /* Use min-height to accommodate addditional padding for touch as needed. */ |
102 min-height: 2em; | 102 min-height: 2em; |
| 103 outline: none; |
103 padding: 3px; | 104 padding: 3px; |
104 outline: none; | |
105 <if expr="is_win or is_macosx or is_ios"> | 105 <if expr="is_win or is_macosx or is_ios"> |
106 /* For better alignment between adjacent buttons and inputs. */ | 106 /* For better alignment between adjacent buttons and inputs. */ |
107 padding-bottom: 4px; | 107 padding-bottom: 4px; |
108 </if> | 108 </if> |
109 } | 109 } |
110 | 110 |
111 input[type='search'] { | 111 input[type='search'] { |
112 -webkit-appearance: textfield; | 112 -webkit-appearance: textfield; |
113 /* NOTE: Keep a relatively high min-width for this so we don't obscure the end | 113 /* NOTE: Keep a relatively high min-width for this so we don't obscure the end |
114 * of the default text in relatively spacious languages (i.e. German). */ | 114 * of the default text in relatively spacious languages (i.e. German). */ |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
227 input[type='password'], | 227 input[type='password'], |
228 input[type='radio'], | 228 input[type='radio'], |
229 input[type='search'], | 229 input[type='search'], |
230 input[type='text'], | 230 input[type='text'], |
231 input[type='url'], | 231 input[type='url'], |
232 input:not([type]), | 232 input:not([type]), |
233 :-webkit-any( | 233 :-webkit-any( |
234 button, | 234 button, |
235 input[type='button'], | 235 input[type='button'], |
236 input[type='submit']):not(.custom-appearance)) { | 236 input[type='submit']):not(.custom-appearance)) { |
237 /* OVERRIDE */ | |
238 -webkit-transition: border-color 200ms; | |
239 /* We use border color because it follows the border radius (unlike outline). | 237 /* We use border color because it follows the border radius (unlike outline). |
240 * This is particularly noticeable on mac. */ | 238 * This is particularly noticeable on mac. */ |
241 border-color: rgb(77, 144, 254); | 239 border-color: rgb(77, 144, 254); |
242 outline: none; | 240 outline: none; |
| 241 /* OVERRIDE */ |
| 242 transition: border-color 200ms; |
243 } | 243 } |
244 | 244 |
245 /* Checkbox/radio helpers ****************************************************** | 245 /* Checkbox/radio helpers ****************************************************** |
246 * | 246 * |
247 * .checkbox and .radio classes wrap labels. Checkboxes and radios should use | 247 * .checkbox and .radio classes wrap labels. Checkboxes and radios should use |
248 * these classes with the markup structure: | 248 * these classes with the markup structure: |
249 * | 249 * |
250 * <div class="checkbox"> | 250 * <div class="checkbox"> |
251 * <label> | 251 * <label> |
252 * <input type="checkbox"></input> | 252 * <input type="checkbox"></input> |
(...skipping 27 matching lines...) Expand all Loading... |
280 | 280 |
281 label > input:disabled:-webkit-any([type='checkbox'], [type='radio']) ~ span { | 281 label > input:disabled:-webkit-any([type='checkbox'], [type='radio']) ~ span { |
282 color: #999; | 282 color: #999; |
283 } | 283 } |
284 | 284 |
285 extensionview { | 285 extensionview { |
286 display: inline-block; | 286 display: inline-block; |
287 height: 300px; | 287 height: 300px; |
288 width: 300px; | 288 width: 300px; |
289 } | 289 } |
OLD | NEW |