/* ----------------------------------------------------------------------------
NOTE: If you edit this file, you should make sure that the CSS rules for
buttons in the following files are updated.
Create a button by adding the `.button` class to an element. For backward
compatibility, we support several other classes (such as `.button-secondary`),
but these will *not* work with the stackable classes described below.
To display a primary button style, add the `.button-primary` class to a button.
Adjust a button's size by adding the `.button-large` or `.button-small` class.
Lock the state of a button by adding the name of the pseudoclass as
an actual class (e.g. `.hover` for `:hover`).
2.0 - Default Button Style
3.0 - Primary Button Style
5.0 - Responsive Button Styles
---------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------------
---------------------------------------------------------------------------- */
.wp-core-ui .button-primary,
.wp-core-ui .button-secondary {
line-height: 2.15384615; /* 28px */
-webkit-appearance: none;
/* Remove the dotted border on :focus and the extra padding in Firefox */
.wp-core-ui button::-moz-focus-inner,
.wp-core-ui input[type="reset"]::-moz-focus-inner,
.wp-core-ui input[type="button"]::-moz-focus-inner,
.wp-core-ui input[type="submit"]::-moz-focus-inner {
.wp-core-ui .button.button-large,
.wp-core-ui .button-group.button-large .button {
line-height: 2.30769231; /* 30px */
.wp-core-ui .button.button-small,
.wp-core-ui .button-group.button-small .button {
line-height: 2.18181818; /* 24px */
.wp-core-ui .button.button-hero,
.wp-core-ui .button-group.button-hero .button {
.wp-core-ui .button.hidden {
/* Style Reset buttons as simple text links */
.wp-core-ui input[type="reset"],
.wp-core-ui input[type="reset"]:hover,
.wp-core-ui input[type="reset"]:active,
.wp-core-ui input[type="reset"]:focus {
/* ----------------------------------------------------------------------------
2.0 - Default Button Style
---------------------------------------------------------------------------- */
.wp-core-ui .button-secondary {
vertical-align: baseline;
.wp-core-ui .button.hover,
.wp-core-ui .button:hover,
.wp-core-ui .button-secondary:hover{
.wp-core-ui .button.focus,
.wp-core-ui .button:focus,
.wp-core-ui .button-secondary:focus {
box-shadow: 0 0 0 1px #3582c4;
/* Only visible in Windows High Contrast mode */
outline: 2px solid transparent;
/* Reset inherited offset from Gutenberg */
.wp-core-ui .button:active,
.wp-core-ui .button-secondary:active {
/* pressed state e.g. a selected setting */
.wp-core-ui .button.active,
.wp-core-ui .button.active:hover {
background-color: #dcdcde;
box-shadow: inset 0 2px 5px -3px #0a4b78;
.wp-core-ui .button.active:focus {
inset 0 2px 5px -3px #0a4b78,
.wp-core-ui .button[disabled],
.wp-core-ui .button:disabled,
.wp-core-ui .button.disabled,
.wp-core-ui .button-secondary[disabled],
.wp-core-ui .button-secondary:disabled,
.wp-core-ui .button-secondary.disabled,
.wp-core-ui .button-disabled {
color: #a7aaad !important;
border-color: #dcdcde !important;
background: #f6f7f7 !important;
box-shadow: none !important;
transform: none !important;
/* Buttons that look like links, for a cross of good semantics with the visual */
.wp-core-ui .button-link {
/* Mimics the default link style in common.css */
text-decoration: underline;
transition-property: border, background, color;
transition-duration: .05s;
transition-timing-function: ease-in-out;
.wp-core-ui .button-link:hover,
.wp-core-ui .button-link:active {
.wp-core-ui .button-link:focus {
0 0 2px 1px rgba(79, 148, 212, 0.8);
/* Only visible in Windows High Contrast mode */
outline: 1px solid transparent;
.wp-core-ui .button-link-delete {
.wp-core-ui .button-link-delete:hover,
.wp-core-ui .button-link-delete:focus {
.wp-core-ui .button-link-delete:disabled {
/* overrides the default buttons disabled background */
background: transparent !important;
/* ----------------------------------------------------------------------------
3.0 - Primary Button Style
---------------------------------------------------------------------------- */
.wp-core-ui .button-primary {
.wp-core-ui .button-primary.hover,
.wp-core-ui .button-primary:hover,
.wp-core-ui .button-primary.focus,
.wp-core-ui .button-primary:focus {
.wp-core-ui .button-primary.focus,
.wp-core-ui .button-primary:focus {
.wp-core-ui .button-primary.active,
.wp-core-ui .button-primary.active:hover,
.wp-core-ui .button-primary.active:focus,
.wp-core-ui .button-primary:active {
.wp-core-ui .button-primary[disabled],
.wp-core-ui .button-primary:disabled,
.wp-core-ui .button-primary-disabled,
.wp-core-ui .button-primary.disabled {
color: #a7aaad !important;
background: #f6f7f7 !important;
border-color: #dcdcde !important;
box-shadow: none !important;
text-shadow: none !important;
/* ----------------------------------------------------------------------------
---------------------------------------------------------------------------- */
.wp-core-ui .button-group {
.wp-core-ui .button-group > .button {
.wp-core-ui .button-group > .button:first-child {
border-radius: 3px 0 0 3px;
.wp-core-ui .button-group > .button:last-child {
border-radius: 0 3px 3px 0;
.wp-core-ui .button-group > .button-primary + .button {
.wp-core-ui .button-group > .button:focus {
/* pressed state e.g. a selected setting */
.wp-core-ui .button-group > .button.active {
background-color: #dcdcde;
box-shadow: inset 0 2px 5px -3px #0a4b78;
.wp-core-ui .button-group > .button.active:focus {
inset 0 2px 5px -3px #0a4b78,
/* ----------------------------------------------------------------------------
5.0 - Responsive Button Styles
---------------------------------------------------------------------------- */
@media screen and (max-width: 782px) {
.wp-core-ui .button.button-large,
.wp-core-ui .button.button-small,
line-height: 2.71428571; /* 38px */
/* Copy attachment URL button in the legacy edit media page. */
.wp-core-ui .copy-to-clipboard-container .copy-attachment-url {
#media-upload.wp-core-ui .button {
.media-frame.mode-grid .bulk-select .button {
/* Publish Metabox Options */
.wp-core-ui .save-post-status.button {
margin: 0 14px 0 10px; /* 14px right margin to match all other buttons */
/* Reset responsive styles in Press This, Customizer */
.wp-core-ui.wp-customizer .button {
line-height: 2.15384615; /* 28px */
.media-modal-content .media-toolbar-primary .media-button {
/* Reset responsive styles on Log in button on iframed login form */
.interim-login .button.button-large {