Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show borders for disabled secondary buttons. #58606

Merged
merged 2 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@

## Unreleased


### Enhancements

- `Button`: Update secondary variant to show the border even in a disabled state. ([#58606](https://github.com/WordPress/gutenberg/pull/58606)).
- `ConfirmDialog`: Add `__next40pxDefaultSize` to buttons ([#58421](https://github.com/WordPress/gutenberg/pull/58421)).
- `SnackbarList`: Allow limiting the number of maximum visible Snackbars ([#58559](https://github.com/WordPress/gutenberg/pull/58559)).
- `Snackbar`: Update the warning message ([#58591](https://github.com/WordPress/gutenberg/pull/58591)).
Expand Down
20 changes: 15 additions & 5 deletions packages/components/src/button/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,6 @@
background: transparent;
transform: none;
opacity: 1;

&:not(:focus) {
box-shadow: none;
outline: none;
}
}
}

Expand All @@ -151,6 +146,12 @@
&:hover:not(:disabled, [aria-disabled="true"]) {
box-shadow: inset 0 0 0 $border-width $components-color-accent-darker-10;
}

&:disabled:not(:focus),
&[aria-disabled="true"]:not(:focus),
&[aria-disabled="true"]:hover:not(:focus) {
box-shadow: inset 0 0 0 $border-width $gray-300;
}
}

/**
Expand Down Expand Up @@ -178,6 +179,15 @@
p + & {
margin-left: -($grid-unit-15 * 0.5);
}

&:disabled,
&[aria-disabled="true"],
&[aria-disabled="true"]:hover {
&:not(:focus) {
box-shadow: none;
outline: none;
}
}
}

/**
Expand Down
Loading