1 /* ----------------------------------------------------------------------------
3 NOTE: If you edit this file, you should make sure that the CSS rules for
4 buttons in the following files are updated.
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.
17 To display a primary button style, add the `.button-primary` class to a button.
21 Adjust a button's size by adding the `.button-large` or `.button-small` class.
25 Lock the state of a button by adding the name of the pseudoclass as
26 an actual class (e.g. `.hover` for `:hover`).
32 2.0 - Default Button Style
33 3.0 - Primary Button Style
35 5.0 - Responsive Button Styles
37 ---------------------------------------------------------------------------- */
39 /* ----------------------------------------------------------------------------
41 ---------------------------------------------------------------------------- */
44 .wp-core-ui .button-primary,
45 .wp-core-ui .button-secondary {
46 display: inline-block;
47 text-decoration: none;
56 -webkit-appearance: none;
57 -webkit-border-radius: 3px;
60 -webkit-box-sizing: border-box;
61 -moz-box-sizing: border-box;
62 box-sizing: border-box;
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 {
71 border-style: solid none;
72 border-color: transparent;
76 .wp-core-ui .button.button-large,
77 .wp-core-ui .button-group.button-large .button {
83 .wp-core-ui .button.button-small,
84 .wp-core-ui .button-group.button-small .button {
91 .wp-core-ui .button.button-hero,
92 .wp-core-ui .button-group.button-hero .button {
99 .wp-core-ui .button:active {
103 .wp-core-ui .button.hidden {
107 /* Style Reset buttons as simple text links */
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 {
115 -webkit-box-shadow: none;
121 /* ----------------------------------------------------------------------------
122 2.0 - Default Button Style
123 ---------------------------------------------------------------------------- */
126 .wp-core-ui .button-secondary {
128 border-color: #cccccc;
130 -webkit-box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(0,0,0,.08);
131 box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba(0,0,0,.08);
135 .wp-core-ui p .button {
136 vertical-align: baseline;
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 {
150 .wp-core-ui .button.focus,
151 .wp-core-ui .button:focus,
152 .wp-core-ui .button-secondary:focus {
153 -webkit-box-shadow: 1px 1px 1px rgba(0,0,0,.2);
154 box-shadow: 1px 1px 1px rgba(0,0,0,.2);
157 .wp-core-ui .button.active,
158 .wp-core-ui .button.active:hover,
159 .wp-core-ui .button.active:focus,
160 .wp-core-ui .button:active,
161 .wp-core-ui .button-secondary:active {
165 -webkit-box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
166 box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
169 .wp-core-ui .button[disabled],
170 .wp-core-ui .button:disabled,
171 .wp-core-ui .button.disabled,
172 .wp-core-ui .button-secondary[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 background: #f7f7f7 !important;
179 -webkit-box-shadow: none !important;
180 box-shadow: none !important;
181 text-shadow: 0 1px 0 #fff !important;
185 /* ----------------------------------------------------------------------------
186 3.0 - Primary Button Style
187 ---------------------------------------------------------------------------- */
189 .wp-core-ui .button-primary {
191 border-color: #0074a2;
192 -webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.5), 0 1px 0 rgba(0,0,0,.15);
193 box-shadow: inset 0 1px 0 rgba(120,200,230,0.5), 0 1px 0 rgba(0,0,0,.15);
195 text-decoration: none;
198 .wp-core-ui .button-primary.hover,
199 .wp-core-ui .button-primary:hover,
200 .wp-core-ui .button-primary.focus,
201 .wp-core-ui .button-primary:focus {
203 border-color: #0074a2;
204 -webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.6);
205 box-shadow: inset 0 1px 0 rgba(120,200,230,0.6);
209 .wp-core-ui .button-primary.focus,
210 .wp-core-ui .button-primary:focus {
211 border-color: #0e3950;
212 -webkit-box-shadow: inset 0 1px 0 rgba(120,200,230,0.6), 1px 1px 2px rgba(0,0,0,0.4);
213 box-shadow: inset 0 1px 0 rgba(120,200,230,0.6), 1px 1px 2px rgba(0,0,0,0.4);
216 .wp-core-ui .button-primary.active,
217 .wp-core-ui .button-primary.active:hover,
218 .wp-core-ui .button-primary.active:focus,
219 .wp-core-ui .button-primary:active {
221 border-color: #005684;
222 color: rgba(255,255,255,0.95);
223 -webkit-box-shadow: inset 0 1px 0 rgba(0,0,0,0.1);
224 box-shadow: inset 0 1px 0 rgba(0,0,0,0.1);
228 .wp-core-ui .button-primary[disabled],
229 .wp-core-ui .button-primary:disabled,
230 .wp-core-ui .button-primary-disabled,
231 .wp-core-ui .button-primary.disabled {
232 color: #94cde7 !important;
233 background: #298cba !important;
234 border-color: #1b607f !important;
235 -webkit-box-shadow: none !important;
236 box-shadow: none !important;
237 text-shadow: 0 -1px 0 rgba(0,0,0,0.1) !important;
241 /* ----------------------------------------------------------------------------
243 ---------------------------------------------------------------------------- */
245 .wp-core-ui .button-group {
247 display: inline-block;
250 vertical-align: middle;
253 .wp-core-ui .button-group > .button {
254 display: inline-block;
255 -webkit-border-radius: 0;
261 .wp-core-ui .button-group > .button-primary {
265 .wp-core-ui .button-group > .button:hover {
269 .wp-core-ui .button-group > .button:first-child {
270 -webkit-border-radius: 3px 0 0 3px;
271 border-radius: 3px 0 0 3px;
274 .wp-core-ui .button-group > .button:last-child {
275 -webkit-border-radius: 0 3px 3px 0;
276 border-radius: 0 3px 3px 0;
279 /* ----------------------------------------------------------------------------
280 5.0 - Responsive Button Styles
281 ---------------------------------------------------------------------------- */
283 @media screen and ( max-width: 782px ) {
286 .wp-core-ui .button.button-large,
287 .wp-core-ui .button.button-small,
294 vertical-align: middle;
299 #media-upload.wp-core-ui .button {
306 /* Publish Metabox Options */
307 .wp-core-ui .save-post-status.button {
309 margin: 0 14px 0 10px; /* 14px right margin to match all other buttons */
312 /* Reset responsive styles in Press This, Customizer */
314 .wp-core-ui.wp-customizer .button,
315 .press-this.wp-core-ui .button,
316 .press-this input#publish,
317 .press-this input#save-post,
318 .press-this a.preview {
324 vertical-align: inherit;
327 /* Reset responsive styles on Log in button on iframed login form */
329 .interim-login .button.button-large {