|
1 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
2 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
4 |
|
5 /* ===== checkbox.css =================================================== |
|
6 == Styles used by the XUL checkbox element. |
|
7 ======================================================================= */ |
|
8 |
|
9 @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); |
|
10 |
|
11 /* ::::: checkbox ::::: */ |
|
12 |
|
13 checkbox { |
|
14 -moz-appearance: checkbox-container; |
|
15 margin: 2px 4px; |
|
16 border-left: 2px transparent; |
|
17 border-right: 2px transparent; |
|
18 } |
|
19 |
|
20 /* With native theming on, the spacer-box paints the check mark and includes |
|
21 the spacing to the right, so that oversized checkbox images can slop over |
|
22 into the space. |
|
23 |
|
24 If we need to disable checkbox theming, the spacer box no longer paints |
|
25 the check mark, but its fallback CSS border supplies the padding between |
|
26 the mark and the label. The xul:image then takes over painting the check |
|
27 mark. */ |
|
28 |
|
29 .checkbox-spacer-box { |
|
30 -moz-appearance: checkbox; |
|
31 -moz-box-align: center; |
|
32 margin: 2px; |
|
33 border-right: 2px solid transparent; |
|
34 } |
|
35 |
|
36 .checkbox-label-center-box { |
|
37 -moz-box-align: center; |
|
38 } |
|
39 |
|
40 .checkbox-label-box { |
|
41 -moz-appearance: checkbox-label; |
|
42 } |
|
43 |
|
44 .checkbox-icon[src] { |
|
45 -moz-margin-end: 2px; |
|
46 } |
|
47 |
|
48 .checkbox-label { |
|
49 margin: 0 !important; |
|
50 } |
|
51 |
|
52 /* ..... focused state ..... */ |
|
53 |
|
54 checkbox:focus > .checkbox-label-center-box > .checkbox-label-box { |
|
55 border: 1px dotted ThreeDDarkShadow; |
|
56 } |
|
57 |
|
58 /* ..... disabled state ..... */ |
|
59 |
|
60 checkbox[disabled="true"] > .checkbox-spacer-box > .checkbox-check { |
|
61 background-color: -moz-Dialog; |
|
62 } |
|
63 |
|
64 checkbox[disabled="true"] { |
|
65 color: GrayText; |
|
66 } |
|
67 |
|
68 /* ::::: checkmark image ::::: */ |
|
69 |
|
70 .checkbox-check { |
|
71 border: 2px solid; |
|
72 -moz-border-top-colors: ThreeDShadow ThreeDDarkShadow; |
|
73 -moz-border-right-colors: ThreeDHighlight ThreeDLightShadow; |
|
74 -moz-border-bottom-colors: ThreeDHighlight ThreeDLightShadow; |
|
75 -moz-border-left-colors: ThreeDShadow ThreeDDarkShadow; |
|
76 min-width: 13px; |
|
77 min-height: 13px; |
|
78 background: -moz-Field no-repeat 50% 50%; |
|
79 } |
|
80 |
|
81 checkbox:not([disabled="true"]):hover { |
|
82 color: -moz-buttonhovertext; |
|
83 text-shadow: none; |
|
84 } |
|
85 |
|
86 checkbox:hover:active > .checkbox-spacer-box > .checkbox-check { |
|
87 background-color: -moz-Dialog; |
|
88 } |
|
89 |
|
90 /* ..... checked state ..... */ |
|
91 |
|
92 checkbox[checked="true"] > .checkbox-spacer-box > .checkbox-check { |
|
93 background-image: url("chrome://global/skin/checkbox/cbox-check.gif"); |
|
94 } |
|
95 |
|
96 checkbox[checked="true"][disabled="true"] > .checkbox-spacer-box > .checkbox-check { |
|
97 background-image: url("chrome://global/skin/checkbox/cbox-check-dis.gif") !important |
|
98 } |
|
99 |