1 /* ----------------------------------------------------------------------------
4 WordPress-style Buttons
5 =======================
6 Create a button by adding the %60.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.
12 To display a primary button style, add the `.button-primary` class to a button.
16 Adjust a button's size by adding the `.button-large` or `.button-small` class.
20 Lock the state of a button by adding the name of the pseudoclass as
21 an actual class (e.g. `.hover` for `:hover`).
27 2.0 - Default Button Style
28 3.0 - Primary Button Style
30 5.0 - Responsive Button Styles
32 ---------------------------------------------------------------------------- */
34 /* ----------------------------------------------------------------------------
36 ---------------------------------------------------------------------------- */
39 .wp-core-ui .button-primary,
40 .wp-core-ui .button-secondary {
41 display: inline-block;
42 text-decoration: none;
51 -webkit-border-radius: 3px;
52 -webkit-appearance: none;
55 -webkit-box-sizing: border-box;
56 -moz-box-sizing: border-box;
57 box-sizing: border-box;
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 {
66 border-style: solid none;
67 border-color: transparent;
71 .wp-core-ui .button.button-large,
72 .wp-core-ui .button-group.button-large .button {
78 .wp-core-ui .button.button-small,
79 .wp-core-ui .button-group.button-small .button {
86 .wp-core-ui .button.button-hero,
87 .wp-core-ui .button-group.button-hero .button {
94 .wp-core-ui .button:active {
98 .wp-core-ui .button.hidden {
102 /* Style Reset buttons as simple text links */
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 {
110 -moz-box-shadow: none;
111 -webkit-box-shadow: none;
117 /* ----------------------------------------------------------------------------
118 2.0 - Default Button Style
119 ---------------------------------------------------------------------------- */
122 .wp-core-ui .button-secondary {
124 border-color: #cccccc;
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);
132 .wp-core-ui p .button {
133 vertical-align: baseline;
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 {
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);
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 {
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 );
166 /* this creates an inset effect on the text */
167 .wp-core-ui .button:active {
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;
184 /* ----------------------------------------------------------------------------
185 3.0 - Primary Button Style
186 ---------------------------------------------------------------------------- */
188 .wp-core-ui .button-primary {
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);
194 text-decoration: none;
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 {
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);
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);
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 {
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);
227 /* this creates an inset effect on the text */
228 .wp-core-ui .button-primary:active {
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;
244 /* ----------------------------------------------------------------------------
246 ---------------------------------------------------------------------------- */
248 .wp-core-ui .button-group {
250 display: inline-block;
253 vertical-align: middle;
256 .wp-core-ui .button-group > .button {
257 display: inline-block;
263 .wp-core-ui .button-group > .button-primary {
267 .wp-core-ui .button-group > .button:hover {
271 .wp-core-ui .button-group > .button:first-child {
272 border-radius: 0 3px 3px 0;
275 .wp-core-ui .button-group > .button:last-child {
276 border-radius: 3px 0 0 3px;
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 /* 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,
310 #media-upload.wp-core-ui .button {
317 /* Publish Metabox Options */
318 .wp-core-ui .save-post-status.button {
320 margin: 0 10px 0 14px; /* 14px right margin to match all other buttons */
323 /* Reset responsive styles in Press This, Customizer */
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 {
335 vertical-align: inherit;
338 /* Reset responsive styles on Log in button on iframed login form */
340 .interim-login .button.button-large {
346 .interim-login .button.button-large:active {