]> scripts.mit.edu Git - autoinstalls/wordpress.git/blob - wp-includes/css/buttons.css
WordPress 3.8-scripts
[autoinstalls/wordpress.git] / wp-includes / css / buttons.css
1 /* ----------------------------------------------------------------------------
2
3
4 WordPress-style Buttons
5 =======================
6 Create a button by adding the `.button` class to an element. For backwards
7 compatibility, we support several other classes (such as `.button-secondary`),
8 but these will *not* work with the stackable classes described below.
9
10 Button Styles
11 -------------
12 To display a primary button style, add the `.button-primary` class to a button.
13
14 Button Sizes
15 ------------
16 Adjust a button's size by adding the `.button-large` or `.button-small` class.
17
18 Button States
19 -------------
20 Lock the state of a button by adding the name of the pseudoclass as
21 an actual class (e.g. `.hover` for `:hover`).
22
23
24 TABLE OF CONTENTS:
25 ------------------
26  1.0 - Button Layouts
27  2.0 - Default Button Style
28  3.0 - Primary Button Style
29  4.0 - Button Groups
30  5.0 - Responsive Button Styles
31
32 ---------------------------------------------------------------------------- */
33
34 /* ----------------------------------------------------------------------------
35   1.0 - Button Layouts
36 ---------------------------------------------------------------------------- */
37
38 .wp-core-ui .button,
39 .wp-core-ui .button-primary,
40 .wp-core-ui .button-secondary {
41         display: inline-block;
42         text-decoration: none;
43         font-size: 13px;
44         line-height: 26px;
45         height: 28px;
46         margin: 0;
47         padding: 0 10px 1px;
48         cursor: pointer;
49         border-width: 1px;
50         border-style: solid;
51         -webkit-border-radius: 3px;
52         -webkit-appearance: none;
53         border-radius: 3px;
54         white-space: nowrap;
55         -webkit-box-sizing: border-box;
56         -moz-box-sizing:    border-box;
57         box-sizing:         border-box;
58 }
59
60 /* Remove the dotted border on :focus and the extra padding in Firefox */
61 .wp-core-ui button::-moz-focus-inner,
62 .wp-core-ui input[type="reset"]::-moz-focus-inner,
63 .wp-core-ui input[type="button"]::-moz-focus-inner,
64 .wp-core-ui input[type="submit"]::-moz-focus-inner {
65         border-width: 1px 0;
66         border-style: solid none;
67         border-color: transparent;
68         padding: 0;
69 }
70
71 .wp-core-ui .button.button-large,
72 .wp-core-ui .button-group.button-large .button {
73         height: 30px;
74     line-height: 28px;
75     padding: 0 12px 2px;
76 }
77
78 .wp-core-ui .button.button-small,
79 .wp-core-ui .button-group.button-small .button {
80         height: 24px;
81         line-height: 22px;
82         padding: 0 8px 1px;
83         font-size: 11px;
84 }
85
86 .wp-core-ui .button.button-hero,
87 .wp-core-ui .button-group.button-hero .button {
88         font-size: 14px;
89         height: 46px;
90         line-height: 44px;
91         padding: 0 36px;
92 }
93
94 .wp-core-ui .button:active {
95         outline: none;
96 }
97
98 .wp-core-ui .button.hidden {
99         display: none;
100 }
101
102 /* Style Reset buttons as simple text links */
103
104 .wp-core-ui input[type="reset"],
105 .wp-core-ui input[type="reset"]:hover,
106 .wp-core-ui input[type="reset"]:active,
107 .wp-core-ui input[type="reset"]:focus {
108         background: none;
109         border: none;
110         -moz-box-shadow: none;
111         -webkit-box-shadow: none;
112         box-shadow: none;
113         padding: 0 2px 1px;
114         width: auto;
115 }
116
117 /* ----------------------------------------------------------------------------
118   2.0 - Default Button Style
119 ---------------------------------------------------------------------------- */
120
121 .wp-core-ui .button,
122 .wp-core-ui .button-secondary {
123         color: #555;
124         border-color: #cccccc;
125         background: #f7f7f7;
126
127         -webkit-box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(0,0,0,.08);
128         box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(0,0,0,.08);
129         vertical-align: top;
130 }
131
132 .wp-core-ui p .button {
133         vertical-align: baseline;
134 }
135
136 .wp-core-ui .button.hover,
137 .wp-core-ui .button:hover,
138 .wp-core-ui .button-secondary:hover,
139 .wp-core-ui .button.focus,
140 .wp-core-ui .button:focus,
141 .wp-core-ui .button-secondary:focus {
142         background: #fafafa;
143         border-color: #999;
144         color: #222;
145 }
146
147 .wp-core-ui .button.focus,
148 .wp-core-ui .button:focus,
149 .wp-core-ui .button-secondary:focus {
150         -webkit-box-shadow: 1px 1px 1px rgba(0,0,0,.2);
151         box-shadow: 1px 1px 1px rgba(0,0,0,.2);
152 }
153
154 .wp-core-ui .button.active,
155 .wp-core-ui .button.active:hover,
156 .wp-core-ui .button.active:focus,
157 .wp-core-ui .button:active,
158 .wp-core-ui .button-secondary:active {
159         background: #eee;
160         border-color: #999;
161         color: #333;
162         -webkit-box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
163         box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
164 }
165
166 /* this creates an inset effect on the text */
167 .wp-core-ui .button:active {
168         padding-top: 1px;
169 }
170
171 .wp-core-ui .button[disabled],
172 .wp-core-ui .button:disabled,
173 .wp-core-ui .button-secondary[disabled],
174 .wp-core-ui .button-secondary:disabled,
175 .wp-core-ui .button-disabled {
176         color: #aaa !important;
177         border-color: #ddd !important;
178         -webkit-box-shadow: none !important;
179         box-shadow:         none !important;
180         text-shadow: 0 1px 0 #fff !important;
181         cursor: default;
182 }
183
184 /* ----------------------------------------------------------------------------
185   3.0 - Primary Button Style
186 ---------------------------------------------------------------------------- */
187
188 .wp-core-ui .button-primary {
189         background: #2ea2cc;
190         border-color: #0074a2; 
191         -webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.5), 0 1px 0 rgba(0,0,0,.15);
192         box-shadow: inset 0 1px 0 rgba(120,200,230,0.5), 0 1px 0 rgba(0,0,0,.15);
193         color: #fff;
194         text-decoration: none;
195 }
196
197 .wp-core-ui .button-primary.hover,
198 .wp-core-ui .button-primary:hover,
199 .wp-core-ui .button-primary.focus,
200 .wp-core-ui .button-primary:focus {
201         background: #1e8cbe;
202         border-color: #0074a2;
203         -webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.6);
204         box-shadow: inset 0 1px 0 rgba(120,200,230,0.6);
205         color: #fff;
206 }
207
208 .wp-core-ui .button-primary.focus,
209 .wp-core-ui .button-primary:focus {
210         border-color: #0e3950;
211         -webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.6), 1px 1px 2px rgba(0,0,0,0.4);
212         box-shadow: inset 0 1px 0 rgba(120,200,230,0.6), 1px 1px 2px rgba(0,0,0,0.4);
213 }
214
215 .wp-core-ui .button-primary.active,
216 .wp-core-ui .button-primary.active:hover,
217 .wp-core-ui .button-primary.active:focus,
218 .wp-core-ui .button-primary:active {
219         background: #1e8cbe;
220         border-color: #005684;
221         color: rgba(255,255,255,0.95);
222         -webkit-box-shadow: inset 0 1px 0 rgba(0,0,0,0.1);
223         box-shadow: inset 0 1px 0 rgba(0,0,0,0.1);
224         vertical-align: top;
225 }
226
227 /* this creates an inset effect on the text */
228 .wp-core-ui .button-primary:active {
229         padding-top: 1px;
230 }
231
232 .wp-core-ui .button-primary[disabled],
233 .wp-core-ui .button-primary:disabled,
234 .wp-core-ui .button-primary-disabled {
235         color: #94cde7 !important;
236         background: #298cba !important;
237         border-color: #1b607f !important;
238         -webkit-box-shadow: none !important;
239         box-shadow:         none !important;
240         text-shadow: 0 -1px 0 rgba(0,0,0,0.1) !important;
241         cursor: default;
242 }
243
244 /* ----------------------------------------------------------------------------
245   4.0 - Button Groups
246 ---------------------------------------------------------------------------- */
247
248 .wp-core-ui .button-group {
249         position: relative;
250         display: inline-block;
251         white-space: nowrap;
252         font-size: 0;
253         vertical-align: middle;
254 }
255
256 .wp-core-ui .button-group > .button {
257         display: inline-block;
258         border-radius: 0;
259         margin-right: -1px;
260         z-index: 10;
261 }
262
263 .wp-core-ui .button-group > .button-primary {
264         z-index: 100;
265 }
266
267 .wp-core-ui .button-group > .button:hover {
268         z-index: 20;
269 }
270
271 .wp-core-ui .button-group > .button:first-child {
272         border-radius: 3px 0 0 3px;
273 }
274
275 .wp-core-ui .button-group > .button:last-child {
276         border-radius: 0 3px 3px 0;
277 }
278
279 /* ----------------------------------------------------------------------------
280   5.0 - Responsive Button Styles
281 ---------------------------------------------------------------------------- */
282
283 @media screen and ( max-width: 782px ) {
284
285         .wp-core-ui .button,
286         .wp-core-ui .button.button-large,
287         .wp-core-ui .button.button-small,
288         input#publish,
289         input#save-post,
290         a.preview {
291                 padding: 10px 14px;
292                 line-height: 1;
293                 font-size: 14px;
294                 vertical-align: middle;
295                 height: auto;
296                 margin-bottom: 4px;
297         }
298         
299         /* Adjust the padding that makes active button text looks inset to account for larger responsive buttons */
300         .wp-core-ui .button:active,
301         .wp-core-ui .button-large:active,
302         .wp-core-ui .button-small:active,
303         input#publish:active,
304         input#save-post:active,
305         a.preview:active {
306                 padding-top: 11px;
307                 padding-bottom: 9px;
308         }
309         
310         #media-upload.wp-core-ui .button {
311                 padding: 0 10px 1px;
312                 height: 24px;
313                 line-height: 22px;
314                 font-size: 13px;
315         }
316
317         /* Publish Metabox Options */
318         .wp-core-ui .save-post-status.button {
319                 position: relative;
320                 margin: 0 14px 0 10px; /* 14px right margin to match all other buttons */
321         }
322         
323         /* Reset responsive styles in Press This, Customizer */
324
325         .wp-core-ui.wp-customizer .button,
326         .press-this.wp-core-ui .button,
327         .press-this input#publish,
328         .press-this input#save-post,
329         .press-this a.preview {
330                 padding: 0 10px 1px;
331                 font-size: 13px;
332                 line-height: 26px;
333                 height: 28px;
334                 margin: 0;
335                 vertical-align: inherit;
336         }
337         
338         /* Reset responsive styles on Log in button on iframed login form */
339         
340         .interim-login .button.button-large {
341                 height: 30px;
342                 line-height: 28px;
343                 padding: 0 12px 2px;
344         }
345         
346         .interim-login .button.button-large:active {
347                 padding-top: 1px;
348         }
349 }