Skip to content

Commit

Permalink
Fix is-pressed disabled styles regression
Browse files Browse the repository at this point in the history
  • Loading branch information
ciampo committed Jul 31, 2024
1 parent de838e0 commit 84417c3
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions packages/components/src/button/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -333,20 +333,30 @@

// Toggled style.
&.is-pressed {
color: $components-color-foreground-inverted;
background: $components-color-foreground;
&,
&:hover {
color: $components-color-foreground-inverted;
&:not(:disabled, [aria-disabled="true"]) {
background: $components-color-foreground;
}
}

&:disabled,
&[aria-disabled="true"] {
color: $gray-500;

&:not(.is-primary):not(.is-secondary):not(.is-tertiary) {
color: $components-color-foreground-inverted;
background: $gray-500;
}
}

&:focus:not(:disabled) {
box-shadow: inset 0 0 0 1px $components-color-background, 0 0 0 var(--wp-admin-border-width-focus) $components-color-accent;

// Windows High Contrast mode will show this outline, but not the box-shadow.
outline: 2px solid transparent;
}

&:hover:not(:disabled) {
color: $components-color-foreground-inverted;
background: $components-color-foreground;
}
}

svg {
Expand Down

0 comments on commit 84417c3

Please sign in to comment.