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

Add an outline when the color picker select box is focused #50609

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 @@ -15,6 +15,7 @@

### Bug Fix

- `ColorPicker`: Add an outline when the color picker select box is focused([#50609](https://github.com/WordPress/gutenberg/pull/50609)).
megane9988 marked this conversation as resolved.
Show resolved Hide resolved
- `InputControl`: Fix focus style to support Windows High Contrast mode ([#50772](https://github.com/WordPress/gutenberg/pull/50772)).

## 24.0.0 (2023-05-10)
Expand Down
9 changes: 7 additions & 2 deletions packages/components/src/color-picker/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,13 @@ export const NumberControlWrapper = styled( NumberControl )`
export const SelectControl = styled( InnerSelectControl )`
margin-left: ${ space( -2 ) };
width: 5em;
${ BackdropUI } {
display: block;
/*
* Remove border, but preserve focus styles
* TODO: this override should be removed,
* see https://github.com/WordPress/gutenberg/pull/50609
*/
select:not( :focus ) ~ ${ BackdropUI }${ BackdropUI }${ BackdropUI } {
border-color: transparent;
}
`;

Expand Down