|
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 /* ===== button.css ===================================================== |
|
6 == Styles used by the XUL button element. |
|
7 ======================================================================= */ |
|
8 |
|
9 @namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); |
|
10 |
|
11 /* :::::::::: button :::::::::: */ |
|
12 |
|
13 button { |
|
14 -moz-appearance: button; |
|
15 margin: 1px 5px 2px 5px; |
|
16 min-width: 6.3em; |
|
17 border: 3px solid; |
|
18 -moz-border-top-colors: transparent ThreeDHighlight ThreeDLightShadow; |
|
19 -moz-border-right-colors: transparent ThreeDDarkShadow ThreeDShadow; |
|
20 -moz-border-bottom-colors: transparent ThreeDDarkShadow ThreeDShadow; |
|
21 -moz-border-left-colors: transparent ThreeDHighlight ThreeDLightShadow; |
|
22 background-color: ThreeDFace; |
|
23 color: ButtonText; |
|
24 text-shadow: none; |
|
25 } |
|
26 |
|
27 .button-box { |
|
28 -moz-appearance: button-focus; |
|
29 border: 1px solid transparent; |
|
30 padding-top: 1px; |
|
31 padding-bottom: 2px; |
|
32 -moz-padding-start: 3px; |
|
33 -moz-padding-end: 4px; |
|
34 } |
|
35 |
|
36 .button-icon { |
|
37 -moz-margin-end: 2px; |
|
38 } |
|
39 |
|
40 .button-text { |
|
41 margin: 0 !important; |
|
42 text-align: center; |
|
43 } |
|
44 |
|
45 /* .......... focused state .......... */ |
|
46 |
|
47 button:focus { |
|
48 -moz-border-top-colors: ThreeDDarkShadow ThreeDHighlight transparent; |
|
49 -moz-border-right-colors: ThreeDDarkShadow ThreeDDarkShadow ThreeDShadow; |
|
50 -moz-border-bottom-colors: ThreeDDarkShadow ThreeDDarkShadow ThreeDShadow; |
|
51 -moz-border-left-colors: ThreeDDarkShadow ThreeDHighlight transparent; |
|
52 } |
|
53 |
|
54 button:focus > .button-box { |
|
55 border: 1px dotted ThreeDDarkShadow; |
|
56 } |
|
57 |
|
58 /* .......... default state .......... */ |
|
59 |
|
60 button[default="true"] { |
|
61 -moz-border-top-colors: ThreeDDarkShadow ThreeDHighlight ThreeDLightShadow; |
|
62 -moz-border-right-colors: ThreeDDarkShadow ThreeDDarkShadow ThreeDShadow; |
|
63 -moz-border-bottom-colors: ThreeDDarkShadow ThreeDDarkShadow ThreeDShadow; |
|
64 -moz-border-left-colors: ThreeDDarkShadow ThreeDHighlight ThreeDLightShadow; |
|
65 } |
|
66 |
|
67 /* .......... hover state .......... */ |
|
68 |
|
69 button:hover { |
|
70 color: -moz-buttonhovertext; |
|
71 background-color: -moz-buttonhoverface; |
|
72 } |
|
73 |
|
74 /* .......... active/open/checked state .......... */ |
|
75 |
|
76 button:hover:active, |
|
77 button[open="true"], |
|
78 button[checked="true"] { |
|
79 -moz-border-top-colors: ThreeDDarkShadow ThreeDShadow transparent; |
|
80 -moz-border-right-colors: ThreeDDarkShadow ThreeDShadow transparent; |
|
81 -moz-border-bottom-colors: ThreeDDarkShadow ThreeDShadow transparent; |
|
82 -moz-border-left-colors: ThreeDDarkShadow ThreeDShadow transparent; |
|
83 color: ButtonText; |
|
84 } |
|
85 |
|
86 button:hover:active > .button-box, |
|
87 button[open="true"] > .button-box, |
|
88 button[checked="true"] > .button-box { |
|
89 padding-top: 2px; |
|
90 padding-bottom: 1px; |
|
91 -moz-padding-start: 4px; |
|
92 -moz-padding-end: 3px; |
|
93 } |
|
94 |
|
95 /* .......... disabled state .......... */ |
|
96 |
|
97 button[disabled="true"], |
|
98 button[disabled="true"]:hover:active { |
|
99 -moz-border-top-colors: transparent ThreeDHighlight ThreeDLightShadow !important; |
|
100 -moz-border-right-colors: transparent ThreeDDarkShadow ThreeDShadow !important; |
|
101 -moz-border-bottom-colors: transparent ThreeDDarkShadow ThreeDShadow !important; |
|
102 -moz-border-left-colors: transparent ThreeDHighlight ThreeDLightShadow !important; |
|
103 color: GrayText; |
|
104 } |
|
105 |
|
106 button[disabled="true"] > .button-box { |
|
107 padding-top: 1px !important; |
|
108 padding-bottom: 2px !important; |
|
109 -moz-padding-start: 3px !important; |
|
110 -moz-padding-end: 4px !important; |
|
111 } |
|
112 |
|
113 /* ::::: menu/menu-button buttons ::::: */ |
|
114 |
|
115 button[type="menu-button"] { |
|
116 -moz-appearance: dualbutton; |
|
117 } |
|
118 |
|
119 .button-menubutton-button { |
|
120 margin: 0; |
|
121 } |
|
122 |
|
123 .button-menu-dropmarker, |
|
124 .button-menubutton-dropmarker { |
|
125 -moz-appearance: toolbarbutton-dropdown !important; |
|
126 } |
|
127 |
|
128 .button-menubutton-dropmarker { |
|
129 -moz-margin-end: 3px; |
|
130 } |
|
131 |
|
132 /* ::::: plain buttons ::::: */ |
|
133 |
|
134 button.plain { |
|
135 border: 0px !important; |
|
136 margin: 0px !important; |
|
137 padding: 0px !important; |
|
138 } |
|
139 |
|
140 button[type="disclosure"] { |
|
141 border: 0px !important; |
|
142 margin: 0px !important; |
|
143 padding: 0px !important; |
|
144 -moz-appearance: none; |
|
145 list-style-image: url("chrome://global/skin/tree/twisty-clsd.png"); |
|
146 min-width: 0px !important; |
|
147 background-color: transparent; |
|
148 } |
|
149 |
|
150 button[type="disclosure"][open="true"] { |
|
151 list-style-image: url("chrome://global/skin/tree/twisty-open.png"); |
|
152 } |
|
153 |
|
154 /* |
|
155 * GNOME Stock Icon Styles |
|
156 */ |
|
157 |
|
158 button[icon="accept"] .button-icon { |
|
159 list-style-image: url("moz-icon://stock/gtk-ok?size=button"); |
|
160 } |
|
161 |
|
162 button[icon="accept"][disabled="true"] .button-icon { |
|
163 list-style-image: url("moz-icon://stock/gtk-ok?size=button&state=disabled"); |
|
164 } |
|
165 |
|
166 button[icon="cancel"] .button-icon { |
|
167 list-style-image: url("moz-icon://stock/gtk-cancel?size=button"); |
|
168 } |
|
169 |
|
170 button[icon="cancel"][disabled="true"] .button-icon { |
|
171 list-style-image: url("moz-icon://stock/gtk-cancel?size=button&state=disabled"); |
|
172 } |
|
173 |
|
174 button[icon="help"] .button-icon { |
|
175 list-style-image: url("moz-icon://stock/gtk-help?size=button"); |
|
176 } |
|
177 |
|
178 button[icon="help"][disabled="true"] .button-icon { |
|
179 list-style-image: url("moz-icon://stock/gtk-help?size=button&state=disabled"); |
|
180 } |
|
181 |
|
182 button[icon="open"] .button-icon { |
|
183 list-style-image: url("moz-icon://stock/gtk-open?size=button"); |
|
184 } |
|
185 |
|
186 button[icon="open"][disabled="true"] .button-icon { |
|
187 list-style-image: url("moz-icon://stock/gtk-open?size=button&state=disabled"); |
|
188 } |
|
189 |
|
190 button[icon="save"] .button-icon { |
|
191 list-style-image: url("moz-icon://stock/gtk-save?size=button"); |
|
192 } |
|
193 |
|
194 button[icon="save"][disabled="true"] .button-icon { |
|
195 list-style-image: url("moz-icon://stock/gtk-save?size=button&state=disabled"); |
|
196 } |
|
197 |
|
198 button[icon="find"] .button-icon { |
|
199 list-style-image: url("moz-icon://stock/gtk-find?size=button"); |
|
200 } |
|
201 |
|
202 button[icon="find"][disabled="true"] .button-icon { |
|
203 list-style-image: url("moz-icon://stock/gtk-find?size=button&state=disabled"); |
|
204 } |
|
205 |
|
206 button[icon="clear"] .button-icon { |
|
207 list-style-image: url("moz-icon://stock/gtk-clear?size=button"); |
|
208 } |
|
209 |
|
210 button[icon="clear"][disabled="true"] .button-icon { |
|
211 list-style-image: url("moz-icon://stock/gtk-clear?size=button&state=disabled"); |
|
212 } |
|
213 |
|
214 button[icon="yes"] .button-icon { |
|
215 list-style-image: url("moz-icon://stock/gtk-yes?size=button"); |
|
216 } |
|
217 |
|
218 button[icon="yes"][disabled="true"] .button-icon { |
|
219 list-style-image: url("moz-icon://stock/gtk-yes?size=button&state=disabled"); |
|
220 } |
|
221 |
|
222 button[icon="no"] .button-icon { |
|
223 list-style-image: url("moz-icon://stock/gtk-no?size=button"); |
|
224 } |
|
225 |
|
226 button[icon="no"][disabled="true"] .button-icon { |
|
227 list-style-image: url("moz-icon://stock/gtk-no?size=button&state=disabled"); |
|
228 } |
|
229 |
|
230 button[icon="apply"] .button-icon { |
|
231 list-style-image: url("moz-icon://stock/gtk-apply?size=button"); |
|
232 } |
|
233 |
|
234 button[icon="apply"][disabled="true"] .button-icon { |
|
235 list-style-image: url("moz-icon://stock/gtk-apply?size=button&state=disabled"); |
|
236 } |
|
237 |
|
238 button[icon="close"] .button-icon { |
|
239 list-style-image: url("moz-icon://stock/gtk-close?size=button"); |
|
240 } |
|
241 |
|
242 button[icon="close"][disabled="true"] .button-icon { |
|
243 list-style-image: url("moz-icon://stock/gtk-close?size=button&state=disabled"); |
|
244 } |
|
245 |
|
246 button[icon="print"] .button-icon { |
|
247 list-style-image: url("moz-icon://stock/gtk-print?size=button"); |
|
248 } |
|
249 |
|
250 button[icon="print"][disabled="true"] .button-icon { |
|
251 list-style-image: url("moz-icon://stock/gtk-print?size=button&state=disabled"); |
|
252 } |
|
253 |
|
254 button[icon="add"] .button-icon { |
|
255 list-style-image: url("moz-icon://stock/gtk-add?size=button"); |
|
256 } |
|
257 |
|
258 button[icon="add"][disabled="true"] .button-icon { |
|
259 list-style-image: url("moz-icon://stock/gtk-add?size=button&state=disabled"); |
|
260 } |
|
261 |
|
262 button[icon="remove"] .button-icon { |
|
263 list-style-image: url("moz-icon://stock/gtk-remove?size=button"); |
|
264 } |
|
265 |
|
266 button[icon="remove"][disabled="true"] .button-icon { |
|
267 list-style-image: url("moz-icon://stock/gtk-remove?size=button&state=disabled"); |
|
268 } |
|
269 |
|
270 button[icon="refresh"] .button-icon { |
|
271 list-style-image: url("moz-icon://stock/gtk-refresh?size=button"); |
|
272 } |
|
273 |
|
274 button[icon="refresh"][disabled="true"] .button-icon { |
|
275 list-style-image: url("moz-icon://stock/gtk-refresh?size=button&state=disabled"); |
|
276 } |
|
277 |
|
278 button[icon="revert"] .button-icon { |
|
279 list-style-image: url("moz-icon://stock/gtk-revert-to-saved?size=button"); |
|
280 } |
|
281 |
|
282 button[icon="revert"][disabled="true"] .button-icon { |
|
283 list-style-image: url("moz-icon://stock/gtk-revert-to-saved?size=button&state=disabled"); |
|
284 } |
|
285 |
|
286 button[icon="go-forward"] .button-icon { |
|
287 list-style-image: url("moz-icon://stock/gtk-go-forward-ltr?size=button"); |
|
288 } |
|
289 |
|
290 button[icon="go-forward"][disabled="true"] .button-icon { |
|
291 list-style-image: url("moz-icon://stock/gtk-go-forward-ltr?size=button&state=disabled"); |
|
292 } |
|
293 |
|
294 button[icon="go-forward"]:-moz-locale-dir(rtl) .button-icon { |
|
295 list-style-image: url("moz-icon://stock/gtk-go-forward-rtl?size=button"); |
|
296 } |
|
297 |
|
298 button[icon="go-forward"]:-moz-locale-dir(rtl)[disabled="true"] .button-icon { |
|
299 list-style-image: url("moz-icon://stock/gtk-go-forward-rtl?size=button&state=disabled"); |
|
300 } |
|
301 |
|
302 button[icon="go-back"] .button-icon { |
|
303 list-style-image: url("moz-icon://stock/gtk-go-back-ltr?size=button"); |
|
304 } |
|
305 |
|
306 button[icon="go-back"][disabled="true"] .button-icon { |
|
307 list-style-image: url("moz-icon://stock/gtk-go-back-ltr?size=button&state=disabled"); |
|
308 } |
|
309 |
|
310 button[icon="go-back"]:-moz-locale-dir(rtl) .button-icon { |
|
311 list-style-image: url("moz-icon://stock/gtk-go-back-rtl?size=button"); |
|
312 } |
|
313 |
|
314 button[icon="go-back"]:-moz-locale-dir(rtl)[disabled="true"] .button-icon { |
|
315 list-style-image: url("moz-icon://stock/gtk-go-back-rtl?size=button&state=disabled"); |
|
316 } |
|
317 |
|
318 button[icon="properties"] .button-icon { |
|
319 list-style-image: url("moz-icon://stock/gtk-properties?size=button"); |
|
320 } |
|
321 |
|
322 button[icon="properties"][disabled="true"] .button-icon { |
|
323 list-style-image: url("moz-icon://stock/gtk-properties?size=button&state=disabled"); |
|
324 } |
|
325 |
|
326 button[icon="select-font"] .button-icon { |
|
327 list-style-image: url("moz-icon://stock/gtk-select-font?size=button"); |
|
328 } |
|
329 |
|
330 button[icon="select-font"][disabled="true"] .button-icon { |
|
331 list-style-image: url("moz-icon://stock/gtk-select-font?size=button&state=disabled"); |
|
332 } |
|
333 |
|
334 button[icon="select-color"] .button-icon { |
|
335 list-style-image: url("moz-icon://stock/gtk-color-picker?size=button"); |
|
336 } |
|
337 |
|
338 button[icon="select-color"][disabled="true"] .button-icon { |
|
339 list-style-image: url("moz-icon://stock/gtk-color-picker?size=button&state=disabled"); |
|
340 } |
|
341 |
|
342 button[icon="network"] .button-icon { |
|
343 list-style-image: url("moz-icon://stock/gtk-network?size=button"); |
|
344 } |
|
345 |
|
346 button[icon="network"][disabled="true"] .button-icon { |
|
347 list-style-image: url("moz-icon://stock/gtk-network?size=button&state=disabled"); |
|
348 } |