| 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 | 5 |
| 6 /* This file defines styles for form controls. The order of rule blocks is | 6 /* This file defines styles for form controls. The order of rule blocks is |
| 7 * important as there are some rules with equal specificity that rely on order | 7 * important as there are some rules with equal specificity that rely on order |
| 8 * as a tiebreaker. These are marked with OVERRIDE. | 8 * as a tiebreaker. These are marked with OVERRIDE. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 margin: 0 1px 0 0; | 28 margin: 0 1px 0 0; |
| 29 text-shadow: 0 1px 0 rgb(240, 240, 240); | 29 text-shadow: 0 1px 0 rgb(240, 240, 240); |
| 30 } | 30 } |
| 31 | 31 |
| 32 :-webkit-any(button, | 32 :-webkit-any(button, |
| 33 input[type='button'], | 33 input[type='button'], |
| 34 input[type='submit']):not(.custom-appearance):not(.link-button), | 34 input[type='submit']):not(.custom-appearance):not(.link-button), |
| 35 select { | 35 select { |
| 36 min-height: 2em; | 36 min-height: 2em; |
| 37 min-width: 4em; | 37 min-width: 4em; |
| 38 <if expr="pp_ifdef('chromeos')"> | |
| 39 /* Without this rule, chromeos button text is too high on the button. */ | |
| 40 padding-top: 3px; | |
| 41 </if> | |
| 42 <if expr="is_win"> | 38 <if expr="is_win"> |
| 43 /* The following platform-specific rule is necessary to get adjacent | 39 /* The following platform-specific rule is necessary to get adjacent |
| 44 * buttons, text inputs, and so forth to align on their borders while also | 40 * buttons, text inputs, and so forth to align on their borders while also |
| 45 * aligning on the text's baselines. */ | 41 * aligning on the text's baselines. */ |
| 46 padding-bottom: 1px; | 42 padding-bottom: 1px; |
| 47 </if> | 43 </if> |
| 48 } | 44 } |
| 49 | 45 |
| 50 :-webkit-any(button, | 46 :-webkit-any(button, |
| 51 input[type='button'], | 47 input[type='button'], |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 color: #444; | 96 color: #444; |
| 101 font: inherit; | 97 font: inherit; |
| 102 margin: 0; | 98 margin: 0; |
| 103 /* Use min-height to accommodate addditional padding for touch as needed. */ | 99 /* Use min-height to accommodate addditional padding for touch as needed. */ |
| 104 min-height: 2em; | 100 min-height: 2em; |
| 105 padding: 3px; | 101 padding: 3px; |
| 106 <if expr="is_win or is_macosx"> | 102 <if expr="is_win or is_macosx"> |
| 107 /* For better alignment between adjacent buttons and inputs. */ | 103 /* For better alignment between adjacent buttons and inputs. */ |
| 108 padding-bottom: 4px; | 104 padding-bottom: 4px; |
| 109 </if> | 105 </if> |
| 110 <if expr="pp_ifdef('chromeos')"> | |
| 111 /* For better alignment between adjacent buttons and inputs. */ | |
| 112 padding-bottom: 2px; | |
| 113 </if> | |
| 114 } | 106 } |
| 115 | 107 |
| 116 input[type='search'] { | 108 input[type='search'] { |
| 117 -webkit-appearance: textfield; | 109 -webkit-appearance: textfield; |
| 118 /* NOTE: Keep a relatively high min-width for this so we don't obscure the end | 110 /* NOTE: Keep a relatively high min-width for this so we don't obscure the end |
| 119 * of the default text in relatively spacious languages (i.e. German). */ | 111 * of the default text in relatively spacious languages (i.e. German). */ |
| 120 min-width: 160px; | 112 min-width: 160px; |
| 121 } | 113 } |
| 122 | 114 |
| 123 /* Checked ********************************************************************/ | 115 /* Checked ********************************************************************/ |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 * these classes with the markup structure: | 276 * these classes with the markup structure: |
| 285 * | 277 * |
| 286 * <div class="checkbox"> | 278 * <div class="checkbox"> |
| 287 * <label> | 279 * <label> |
| 288 * <input type="checkbox"></input> | 280 * <input type="checkbox"></input> |
| 289 * <span> | 281 * <span> |
| 290 * </label> | 282 * </label> |
| 291 * </div> | 283 * </div> |
| 292 */ | 284 */ |
| 293 | 285 |
| 294 .checkbox, | |
| 295 .radio { | |
| 296 margin: 0.65em 0; | |
| 297 } | |
| 298 | |
| 299 :-webkit-any(.checkbox, .radio) label { | 286 :-webkit-any(.checkbox, .radio) label { |
| 300 /* Don't expand horizontally: <http://crbug.com/112091>. */ | 287 /* Don't expand horizontally: <http://crbug.com/112091>. */ |
| 301 display: -webkit-inline-box; | 288 display: -webkit-inline-box; |
| 289 padding-bottom: 7px; |
| 290 padding-top: 7px; |
| 302 } | 291 } |
| 303 | 292 |
| 304 :-webkit-any(.checkbox, .radio) label input ~ span { | 293 :-webkit-any(.checkbox, .radio) label input ~ span { |
| 305 -webkit-margin-start: 0.6em; | 294 -webkit-margin-start: 0.6em; |
| 306 /* Make sure long spans wrap at the same horizontal position they start. */ | 295 /* Make sure long spans wrap at the same horizontal position they start. */ |
| 307 display: block; | 296 display: block; |
| 308 } | 297 } |
| 309 | 298 |
| 310 :-webkit-any(.checkbox, .radio) label:hover { | 299 :-webkit-any(.checkbox, .radio) label:hover { |
| 311 color: black; | 300 color: black; |
| 312 } | 301 } |
| 313 | 302 |
| 314 label > input:disabled:-webkit-any([type='checkbox'], [type='radio']) ~ span { | 303 label > input:disabled:-webkit-any([type='checkbox'], [type='radio']) ~ span { |
| 315 color: #999; | 304 color: #999; |
| 316 } | 305 } |
| OLD | NEW |