Skip to content

Commit

Permalink
Button: Update disabled state to be without background.
Browse files Browse the repository at this point in the history
  • Loading branch information
jasmussen committed May 10, 2023
1 parent 4c1c15d commit 92e8b2b
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions packages/components/src/button/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -118,21 +118,15 @@
outline: 1px solid transparent;

&:active:not(:disabled) {
background: $components-color-gray-300;
color: $components-color-accent-darker-10;
box-shadow: none;
}

&:hover:not(:disabled) {
color: $components-color-accent-darker-10;
}

&:disabled,
&[aria-disabled="true"],
&[aria-disabled="true"]:hover {
// TODO: Prepare for theming (https://github.com/WordPress/gutenberg/pull/45466/files#r1030872724)
color: lighten($gray-700, 5%);
background: lighten($gray-300, 5%);
color: $gray-600;
background: transparent;
transform: none;
opacity: 1;
box-shadow: none;
Expand Down Expand Up @@ -165,12 +159,12 @@
color: $components-color-accent;
background: transparent;

&:hover:not(:disabled) {
&:hover:not(:disabled, [aria-disabled="true"]) {
// TODO: Prepare for theming (https://github.com/WordPress/gutenberg/pull/45466/files#r1030872724)
background: rgba(var(--wp-admin-theme-color--rgb), 0.04);
}

&:active:not(:disabled) {
&:active:not(:disabled, [aria-disabled="true"]) {
// TODO: Prepare for theming (https://github.com/WordPress/gutenberg/pull/45466/files#r1030872724)
background: rgba(var(--wp-admin-theme-color--rgb), 0.08);
}
Expand Down Expand Up @@ -239,7 +233,7 @@
}
}

&:not([aria-disabled="true"]):active {
&:not(:disabled, [aria-disabled="true"]):active {
color: $components-color-foreground;
}

Expand Down

0 comments on commit 92e8b2b

Please sign in to comment.