diff --git a/packages/components/src/button/style.scss b/packages/components/src/button/style.scss index ae242c38634180..3bc99f3a7975c1 100644 --- a/packages/components/src/button/style.scss +++ b/packages/components/src/button/style.scss @@ -23,16 +23,10 @@ } &[aria-expanded="true"], - &:hover { + &:hover:not(:disabled, [aria-disabled="true"]) { color: $components-color-accent; } - // Unset some hovers, instead of adding :not specificity. - &:disabled:hover, - &[aria-disabled="true"]:hover { - color: initial; - } - // Focus. // See https://github.com/WordPress/gutenberg/issues/13267 for more context on these selectors. &:focus:not(:disabled) { @@ -80,7 +74,6 @@ color: rgba($white, 0.4); background: $components-color-accent; border-color: $components-color-accent; - opacity: 1; outline: none; &:focus:enabled { @@ -125,7 +118,6 @@ color: $gray-600; background: transparent; transform: none; - opacity: 1; } } @@ -199,17 +191,22 @@ &:not(.is-primary):not(.is-secondary):not(.is-tertiary):not(.is-link) { color: $alert-red; - &:hover:not(:disabled) { + &:hover:not(:disabled, [aria-disabled="true"]) { color: darken($alert-red, 20%); } - &:focus:not(:disabled) { + &:focus { box-shadow: 0 0 0 var(--wp-admin-border-width-focus) $alert-red; } - &:active:not(:disabled) { + &:active:not(:disabled, [aria-disabled="true"]) { background: $gray-400; } + + &:disabled, + &[aria-disabled="true"] { + color: lighten($alert-red, 40%); + } } } @@ -237,6 +234,11 @@ &:focus { border-radius: $radius-block-ui; } + + &:disabled, + &[aria-disabled="true"] { + color: $gray-600; + } } &:not(:disabled, [aria-disabled="true"]):active { @@ -246,7 +248,11 @@ &:disabled, &[aria-disabled="true"] { cursor: default; - opacity: 0.3; + color: $gray-600; + + svg { + opacity: 0.66; + } } &.is-busy, @@ -259,7 +265,6 @@ @media (prefers-reduced-motion: reduce) { animation-duration: 0s; } - opacity: 1; background-size: 100px 100%; /* stylelint-disable -- Disable reason: This function call looks nicer when each argument is on its own line. */ background-image: linear-gradient(