OLD | NEW |
1 /* Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 /* Copyright (c) 2011 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 input[type='checkbox'] { | 6 input[type='checkbox'] { |
7 -webkit-box-shadow: inset 0 1px 2px white, | 7 -webkit-box-shadow: inset 0 1px 2px white, |
8 0 1px 2px rgba(0, 0, 0, .2); | 8 0 1px 2px rgba(0, 0, 0, .2); |
9 -webkit-appearance: none; | 9 -webkit-appearance: none; |
10 -webkit-margin-start: 0; | 10 -webkit-margin-start: 0; |
11 -webkit-margin-end: 3px; | 11 -webkit-margin-end: 3px; |
12 background: -webkit-linear-gradient(#fafafa, #dcdcdc); | 12 background: -webkit-linear-gradient(#fafafa, #dcdcdc); |
13 border-radius: 3px; | 13 border-radius: 3px; |
14 border: 1px solid #a0a0a0; | 14 border: 1px solid #a0a0a0; |
15 display: inline-block; | 15 display: inline-block; |
16 font: inherit; /* TODO(csilv): investigate why this is required on the | |
17 Windows platform. http://crbug.com/105811 */ | |
18 height: 16px; | 16 height: 16px; |
19 margin-bottom: 0; | 17 margin-bottom: 0; |
20 margin-top: 0; | 18 margin-top: 0; |
21 position: relative; | 19 position: relative; |
22 top: 3px; | 20 top: 3px; |
23 vertical-align: baseline; | 21 vertical-align: baseline; |
24 width: 16px; | 22 width: 16px; |
25 } | 23 } |
26 | 24 |
27 input[type='checkbox']:disabled { | 25 input[type='checkbox']:disabled { |
28 opacity: .75; | 26 opacity: .75; |
29 } | 27 } |
30 | 28 |
31 input[type='checkbox']:not(:disabled):not(:active):hover { | 29 input[type='checkbox']:not(:disabled):not(:active):hover { |
32 background: -webkit-linear-gradient(#fff, #e6e6e6); | 30 background: -webkit-linear-gradient(#fff, #e6e6e6); |
33 text-shadow: 0 1px 0 rgba(255, 255, 255, 1); | 31 text-shadow: 0 1px 0 rgba(255, 255, 255, 1); |
34 } | 32 } |
35 | 33 |
36 input[type='checkbox']:not(:disabled):active { | 34 input[type='checkbox']:not(:disabled):active { |
37 -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .2); | 35 -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, .2); |
38 background: -webkit-linear-gradient(#f0f0f0, #bebebe); | 36 background: -webkit-linear-gradient(#f0f0f0, #bebebe); |
39 border: 1px solid #808080; | 37 border: 1px solid #808080; |
40 text-shadow: 0 1px 0 rgba(255, 255, 255, .25); | 38 text-shadow: 0 1px 0 rgba(255, 255, 255, .25); |
41 } | 39 } |
42 | 40 |
43 input[type='checkbox']:checked::before { | 41 input[type='checkbox']:checked::before { |
44 color: #808080; | 42 color: #808080; |
45 content: url('../images/checkmark.png'); | 43 content: url('../images/checkmark.png'); |
| 44 font-size: 13px; /* Explicitly set the font size so that the positioning |
| 45 of the checkmark is correct. */ |
46 height: 16px; | 46 height: 16px; |
47 left: 2px; | 47 left: 2px; |
48 position: absolute; | 48 position: absolute; |
49 } | 49 } |
50 | 50 |
51 html[os=mac] input[type='checkbox']:checked::before { | |
52 top: 2px; | |
53 } | |
54 | |
55 input[type='radio'] { | 51 input[type='radio'] { |
56 -webkit-box-shadow: inset 0 1px 2px white, | 52 -webkit-box-shadow: inset 0 1px 2px white, |
57 0 1px 2px rgba(0, 0, 0, .2); | 53 0 1px 2px rgba(0, 0, 0, .2); |
58 -webkit-appearance: none; | 54 -webkit-appearance: none; |
59 -webkit-margin-start: 0; | 55 -webkit-margin-start: 0; |
60 -webkit-margin-end: 3px; | 56 -webkit-margin-end: 3px; |
61 -webkit-transition: border 500ms; | 57 -webkit-transition: border 500ms; |
62 background: -webkit-linear-gradient(#fafafa, #dcdcdc); | 58 background: -webkit-linear-gradient(#fafafa, #dcdcdc); |
63 border-radius: 100%; | 59 border-radius: 100%; |
64 border: 1px solid #a0a0a0; | 60 border: 1px solid #a0a0a0; |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
129 | 125 |
130 label:hover > input[type=checkbox]:disabled ~ span, | 126 label:hover > input[type=checkbox]:disabled ~ span, |
131 label:hover > input[type=radio]:disabled ~ span { | 127 label:hover > input[type=radio]:disabled ~ span { |
132 color: #888; | 128 color: #888; |
133 } | 129 } |
134 | 130 |
135 label:hover > input[type=checkbox]:not(:disabled) ~ span, | 131 label:hover > input[type=checkbox]:not(:disabled) ~ span, |
136 label:hover > input[type=radio]:not(:disabled) ~ span { | 132 label:hover > input[type=radio]:not(:disabled) ~ span { |
137 color: #222; | 133 color: #222; |
138 } | 134 } |
OLD | NEW |