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 %60.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 {
75 .wp-core-ui .button.button-large,
76 .wp-core-ui .button-group.button-large .button {
82 .wp-core-ui .button.button-small,
83 .wp-core-ui .button-group.button-small .button {
90 .wp-core-ui .button.button-hero,
91 .wp-core-ui .button-group.button-hero .button {
98 .wp-core-ui .button:active,
99 .wp-core-ui .button:focus {
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, 0.08 );
131 box-shadow: inset 0 1px 0 #fff, 0 1px 0 rgba( 0, 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 {
155 0 0 2px 1px rgba(30, 140, 190, .8);
158 0 0 2px 1px rgba(30, 140, 190, .8);
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 {
168 -webkit-box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
169 box-shadow: inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 );
172 .wp-core-ui .button.active:focus {
174 inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 ),
176 0 0 2px 1px rgba(30, 140, 190, .8);
178 inset 0 2px 5px -3px rgba( 0, 0, 0, 0.5 ),
180 0 0 2px 1px rgba(30, 140, 190, .8);
183 .wp-core-ui .button[disabled],
184 .wp-core-ui .button:disabled,
185 .wp-core-ui .button.disabled,
186 .wp-core-ui .button-secondary[disabled],
187 .wp-core-ui .button-secondary:disabled,
188 .wp-core-ui .button-secondary.disabled,
189 .wp-core-ui .button-disabled {
190 color: #aaa !important;
191 border-color: #ddd !important;
192 background: #f7f7f7 !important;
193 -webkit-box-shadow: none !important;
194 box-shadow: none !important;
195 text-shadow: 0 1px 0 #fff !important;
199 /* ----------------------------------------------------------------------------
200 3.0 - Primary Button Style
201 ---------------------------------------------------------------------------- */
203 .wp-core-ui .button-primary {
205 border-color: #0074a2;
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 );
209 text-decoration: none;
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 {
217 border-color: #0074a2;
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 );
223 .wp-core-ui .button-primary.focus,
224 .wp-core-ui .button-primary:focus {
225 border-color: #0e3950;
227 inset 0 1px 0 rgba( 120, 200, 230, 0.6 ),
229 0 0 2px 1px rgba(30, 140, 190, .8);
231 inset 0 1px 0 rgba( 120, 200, 230, 0.6 ),
233 0 0 2px 1px rgba(30, 140, 190, .8);
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 {
241 border-color: #005684;
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 );
248 .wp-core-ui .button-primary[disabled],
249 .wp-core-ui .button-primary:disabled,
250 .wp-core-ui .button-primary-disabled,
251 .wp-core-ui .button-primary.disabled {
252 color: #94cde7 !important;
253 background: #298cba !important;
254 border-color: #1b607f !important;
255 -webkit-box-shadow: none !important;
256 box-shadow: none !important;
257 text-shadow: 0 -1px 0 rgba( 0, 0, 0, 0.1 ) !important;
261 /* ----------------------------------------------------------------------------
263 ---------------------------------------------------------------------------- */
265 .wp-core-ui .button-group {
267 display: inline-block;
270 vertical-align: middle;
273 .wp-core-ui .button-group > .button {
274 display: inline-block;
275 -webkit-border-radius: 0;
281 .wp-core-ui .button-group > .button-primary {
285 .wp-core-ui .button-group > .button:hover {
289 .wp-core-ui .button-group > .button:first-child {
290 -webkit-border-radius: 0 3px 3px 0;
291 border-radius: 0 3px 3px 0;
294 .wp-core-ui .button-group > .button:last-child {
295 -webkit-border-radius: 3px 0 0 3px;
296 border-radius: 3px 0 0 3px;
299 .wp-core-ui .button-group > .button:focus {
304 /* ----------------------------------------------------------------------------
305 5.0 - Responsive Button Styles
306 ---------------------------------------------------------------------------- */
308 @media screen and ( max-width: 782px ) {
311 .wp-core-ui .button.button-large,
312 .wp-core-ui .button.button-small,
319 vertical-align: middle;
324 #media-upload.wp-core-ui .button {
331 .media-frame.mode-grid .bulk-select .button {
335 /* Publish Metabox Options */
336 .wp-core-ui .save-post-status.button {
338 margin: 0 10px 0 14px; /* 14px right margin to match all other buttons */
341 /* Reset responsive styles in Press This, Customizer */
343 .wp-core-ui.wp-customizer .button,
344 .press-this.wp-core-ui .button,
345 .press-this input#publish,
346 .press-this input#save-post,
347 .press-this a.preview {
353 vertical-align: inherit;
356 /* Reset responsive styles on Log in button on iframed login form */
358 .interim-login .button.button-large {