Skip to content
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
1 change: 1 addition & 0 deletions packages/components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

### Bug Fixes

- `ToolsPanel`: Keep the "Reset" label visible on the highlighted menu item ([#86045](https://github.com/WordPress/gutenberg/pull/86045)).
- `MenuItem`: Keep the menu width stable when a checkbox or radio item is checked or unchecked ([#85831](https://github.com/WordPress/gutenberg/pull/85831)).
- `DropdownMenu`: Keep the height of `MenuItem` consistent regardless of whether it has an icon ([#85503](https://github.com/WordPress/gutenberg/pull/85503)).
- `ColorPicker`: Fire `onChange` immediately for hex and RGB input, so an edit is no longer lost when the picker closes right after it ([#85734](https://github.com/WordPress/gutenberg/pull/85734)).
Expand Down
5 changes: 5 additions & 0 deletions packages/components/src/tools-panel/style.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,11 @@

.default-controls-item {
color: $gray-900;

// Match the foreground of the highlighted item's brand fill.
&:focus .reset-label {
color: inherit;
}
Comment on lines +102 to +105

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Reset label only renders on the role="menuitem" items, which never get aria-selected and are never disabled, so only :focus can match here. Can we simplify this?

Suggested change
// Match the foreground of the highlighted item's brand fill.
&:is(:focus, [aria-selected="true"]):not(:disabled, [aria-disabled="true"]) .reset-label {
color: inherit;
}
// Match the foreground of the highlighted item's brand fill.
&:focus .reset-label {
color: inherit;
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the feedback. I've applied the suggestion.

}

// Preserve the established specificity so disabled MenuItem styles
Expand Down
Loading