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