|
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 /* ===== radio.css =================================================== |
|
6 == Styles used by the XUL radio element. |
|
7 ======================================================================= */ |
|
8 |
|
9 @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); |
|
10 |
|
11 /* ::::: radio ::::: */ |
|
12 |
|
13 radio { |
|
14 -moz-appearance: radio-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 radio mark and includes |
|
21 the spacing to the right, so that oversized radio images can slop over |
|
22 into the space. |
|
23 |
|
24 If we need to disable radio button theming, the spacer box no longer paints |
|
25 the radio mark, but its fallback CSS border supplies the padding between |
|
26 the mark and the label. The xul:image then takes over painting the radio |
|
27 mark. */ |
|
28 |
|
29 .radio-spacer-box { |
|
30 -moz-appearance: radio; |
|
31 -moz-box-align: center; |
|
32 margin: 2px; |
|
33 border-right: 2px solid transparent; |
|
34 } |
|
35 |
|
36 .radio-label-center-box { |
|
37 -moz-box-align: center; |
|
38 } |
|
39 |
|
40 .radio-label-box { |
|
41 -moz-appearance: radio-label; |
|
42 } |
|
43 |
|
44 .radio-icon[src] { |
|
45 -moz-margin-end: 2px; |
|
46 } |
|
47 |
|
48 .radio-label { |
|
49 margin: 0 !important; |
|
50 } |
|
51 |
|
52 /* ..... focused state ..... */ |
|
53 |
|
54 radio[focused="true"] > .radio-label-center-box > .radio-label-box { |
|
55 border: 1px dotted ThreeDDarkShadow; |
|
56 } |
|
57 |
|
58 /* ..... disabled state ..... */ |
|
59 |
|
60 radio[disabled="true"] > .radio-spacer-box > .radio-check-box1 { |
|
61 background-color: -moz-Dialog; |
|
62 } |
|
63 |
|
64 radio[disabled="true"] { |
|
65 color: GrayText; |
|
66 } |
|
67 |
|
68 /* ::::: checkmark image ::::: */ |
|
69 |
|
70 .radio-check-box1 { |
|
71 border-top: 1px solid ThreeDShadow; |
|
72 border-right: 1px solid ThreeDHighlight; |
|
73 border-bottom: 1px solid ThreeDHighlight; |
|
74 border-left: 1px solid ThreeDShadow; |
|
75 border-radius: 50%; |
|
76 min-width: 12px; |
|
77 min-height: 12px; |
|
78 background-color: -moz-Field; |
|
79 } |
|
80 |
|
81 .radio-check-box2 { |
|
82 border-top: 1px solid ThreeDDarkShadow; |
|
83 border-right: 1px solid ThreeDLightShadow; |
|
84 border-bottom: 1px solid ThreeDLightShadow; |
|
85 border-left: 1px solid ThreeDDarkShadow; |
|
86 border-radius: 50%; |
|
87 padding: 2px; |
|
88 width: 4px; |
|
89 height: 4px; |
|
90 list-style-image: none; |
|
91 } |
|
92 |
|
93 radio:not([disabled="true"]):hover { |
|
94 color: -moz-buttonhovertext; |
|
95 text-shadow: none; |
|
96 } |
|
97 |
|
98 radio:hover:active > .radio-spacer-box > .radio-check-box1 { |
|
99 background-color: -moz-Dialog; |
|
100 } |
|
101 |
|
102 /* ..... selected state ..... */ |
|
103 |
|
104 radio[selected="true"] > .radio-spacer-box > .radio-check-box1 > .radio-check-box2 { |
|
105 list-style-image: url("chrome://global/skin/radio/radio-check.gif"); |
|
106 } |
|
107 |
|
108 radio[selected="true"][disabled="true"] > .radio-spacer-box > .radio-check-box1 > .radio-check-box2 { |
|
109 list-style-image: url("chrome://global/skin/radio/radio-check-dis.gif") !important |
|
110 } |