Skip to content

Commit

Permalink
Improve toolbar button visual focus (#55523)
Browse files Browse the repository at this point in the history
* Update block-toolbar-button-style__focus mixin

* Use block-toolbar-button-style__focus on block styles
  • Loading branch information
richtabor authored Oct 24, 2023
1 parent b1c52f3 commit ccd87c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/base-styles/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
*/

@mixin block-toolbar-button-style__focus() {
box-shadow: inset 0 0 0 var(--wp-admin-border-width-focus) var(--wp-admin-theme-color), inset 0 0 0 4px $white;
box-shadow: inset 0 0 0 $border-width var(--wp-components-color-background, $white), 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));

// Windows High Contrast mode will show this outline, but not the box-shadow.
outline: 2px solid transparent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

&:focus,
&.is-active:focus {
box-shadow: inset 0 0 0 $border-width var(--wp-components-color-background, #fff), 0 0 0 var(--wp-admin-border-width-focus) var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
@include block-toolbar-button-style__focus();
}
}

Expand Down

0 comments on commit ccd87c4

Please sign in to comment.