6e005d89 |
1 | /* NEW WIDGET ANDING: <button> */ |
2 | |
3 | /** Default Button Styles (apply to usage of <button> without |
4 | * any applied class). |
5 | **/ |
6 | |
7 | /* outer frame */ |
8 | button |
9 | { |
10 | border : none; |
11 | margin : 1px 5px 2px 5px; |
12 | background-color : #CCD0DD; |
13 | } |
14 | |
15 | button[disabled="true"], |
16 | button[disabled="true"]:hover, |
17 | button[disabled="true"]:hover:active |
18 | { |
19 | border : none; |
20 | color : #999999; |
21 | } |
22 | |
23 | /* internal frame */ |
24 | button > .button-internal-box |
25 | { |
26 | vertical-align : middle; |
27 | text-align : center; |
28 | border : 1px outset #CCD0DD; |
29 | padding : 1px; |
30 | } |
31 | |
32 | button:hover:active > .button-internal-box |
33 | { |
34 | border : 1px inset #CCD0DD; |
35 | padding : 2px 0px 0px 2px; |
36 | } |
37 | |
38 | button[disabled="true"] > .button-internal-box, |
39 | button[disabled="true"]:hover > .button-internal-box, |
40 | button[disabled="true"]:hover:active > .button-internal-box |
41 | { |
42 | border : 1px outset #CCD0DD; |
43 | padding : 1px; |
44 | } |
45 | |
46 | /* text wrapping frame (hack because <text> does not support alignment) */ |
47 | .button-text-container |
48 | { |
49 | text-align : center; |
50 | vertical-align : middle; |
51 | } |
52 | |
53 | /* text frame */ |
54 | .button-text |
55 | { |
56 | padding : 1px 2px 1px 2px; |
57 | } |
58 | |
59 | button[orient="vertical"] > .button-internal-box > .button-text-container > .button-text |
60 | { |
61 | padding : 2px 2px 1px 2px; |
62 | } |
63 | |
64 | /** Styles for "DEFAULT" buttons (usually 'OK' or equivalent in dialogs. |
65 | * To activate, set 'default' attribute on button. |
66 | **/ |
67 | |
68 | /* outer frame */ |
69 | button[default] |
70 | { |
71 | /* XXX this is a HACK until 'orient' is supported in CSS! XXX */ |
72 | /* strictly speaking not necessary because default for buttonright is |
73 | * to lay image out horizontally, but leaving here as a reminder to |
74 | * implement this feature */ |
75 | -moz-binding : url(chrome://global/content/xulBindings.xml#buttonright); |
76 | font-weight : bold; |
77 | list-style-image : url("chrome://global/skin/return.gif"); |
78 | } |
79 | |
80 | button[default][disabled="true"] |
81 | { |
82 | list-style-image : url("chrome://global/skin/return-disabled.gif"); |
83 | } |
84 | |
85 | /** Styles for 'dialog' buttons (usually any command button in a dialog) |
86 | * This class gives buttons 10px of padding on each side to increase the |
87 | * strike area and make buttons with small amounts of text (e.g. 'OK') |
88 | * look less silly. |
89 | **/ |
90 | |
91 | /* internal frame */ |
92 | .button-dialog > .button-internal-box, |
93 | .button-dialog:hover > .button-internal-box |
94 | { |
95 | padding : 2px 10px 2px 10px; |
96 | } |
97 | |
98 | .button-dialog:hover:hover:active > .button-internal-box |
99 | { |
100 | padding : 3px 9px 1px 11px; |
101 | } |
102 | |
103 | /** Styles for grey toolbar buttons. These buttons are used in places like |
104 | * editor's formatting toolbar or toolbars wanting a button similar to a command |
105 | * button but without an initial outset frame. |
106 | **/ |
107 | .button-borderless |
108 | { |
109 | border : 1px solid #CCD0DD; |
110 | } |
111 | |
112 | .button-borderless:hover |
113 | { |
114 | border : 1px solid #000000; |
115 | } |
116 | |
117 | .button-borderless > .button-internal-box |
118 | { |
119 | border : 1px solid #CCD0DD; |
120 | } |
121 | |
122 | .button-borderless:hover > .button-internal-box |
123 | { |
124 | border : 1px outset #CCD0DD; |
125 | } |
126 | |
127 | .button-borderless:hover:active > .button-internal-box |
128 | { |
129 | border : 1px inset #CCD0DD; |
130 | } |
131 | |
132 | /** plain (raw) buttons, class="plain" **/ |
133 | |
134 | button.plain, button.plain:hover, button.plain:hover:active, |
135 | button.plain > .button-internal-box, |
136 | button.plain:hover:active > .button-internal-box, |
137 | button.plain > .button-internal-box:hover:active, |
138 | button.plain > .button-internal-box > .button-text-container, |
139 | button.plain > .button-internal-box > .button-text-container:hover:active, |
140 | button.plain > .button-internal-box > .button-text-container > .button-text, |
141 | button.plain > .button-internal-box > .button-text-container > .button.text:hover:active, |
142 | button.plain > .button-internal-box > .button-icon, |
143 | button.plain > .button-internal-box > .button.icon:hover:active |
144 | { |
145 | border : 0px; |
146 | margin : 0px; |
147 | padding : 0px; |
148 | } |
149 | |
150 | |
151 | /** |
152 | * utility class for buttons with associated popup |
153 | **/ |
154 | .button-popup |
155 | { |
156 | list-style-image : url(chrome://global/skin/taskbar-popup-arrow.gif); |
157 | } |
158 | |
159 | |
160 | |