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

Button: Add hover style to secondary variant #67325

Merged
merged 16 commits into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from 6 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
1 change: 1 addition & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
- `DropZone`: Add `isEligible` prop to allow customizing whether the drop zone should activate ([#67317](https://github.com/WordPress/gutenberg/pull/67317)).
- `CircularOptionPicker`: Update `Button` sizes to be ready for 40px default size ([#67285](https://github.com/WordPress/gutenberg/pull/67285)).
- `DuotonePicker`: Simplify Button styles ([#66641](https://github.com/WordPress/gutenberg/pull/66641)).
- `Button`: Increase font weight of `primary`, `secondary`, and `tertiary` variants. Adjust `secondary` variant hover style. ([#67325](https://github.com/WordPress/gutenberg/pull/67325)).

### Experimental

Expand Down
13 changes: 11 additions & 2 deletions packages/components/src/button/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@
outline: 3px solid transparent;
}

&.is-primary,
&.is-secondary,
&.is-tertiary {
font-weight: $font-weight-medium;
}

/**
* Primary button style.
*/
Expand Down Expand Up @@ -140,7 +146,9 @@
background: transparent;

&:hover:not(:disabled, [aria-disabled="true"]) {
box-shadow: inset 0 0 0 $border-width $components-color-accent-darker-10;
box-shadow: inset 0 0 0 $border-width $components-color-accent-darker-20;
color: $components-color-accent-darker-20;
background: rgba(var(--wp-admin-theme-color--rgb), 0.04);
jameskoster marked this conversation as resolved.
Show resolved Hide resolved
}

&:disabled:not(:focus),
Expand Down Expand Up @@ -220,7 +228,8 @@
}
}

&.is-tertiary {
&.is-tertiary,
&.is-secondary {
&:hover:not(:disabled, [aria-disabled="true"]) {
background: rgba($alert-red, 0.04);
}
Expand Down
Loading