From 41f76b223751549cf4abe2860570c9e68b0454df Mon Sep 17 00:00:00 2001 From: Marco Ciampini Date: Thu, 20 Oct 2022 11:22:34 +0200 Subject: [PATCH] Use focus-visible only for block mover buttons, remaining toolbar buttons use same focus styles as on trunk --- packages/components/src/toolbar/style.scss | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/packages/components/src/toolbar/style.scss b/packages/components/src/toolbar/style.scss index a1339b7b2de17d..e25b1128725850 100644 --- a/packages/components/src/toolbar/style.scss +++ b/packages/components/src/toolbar/style.scss @@ -66,15 +66,22 @@ } } - // Focus style. - &:focus-visible::before { + // Focus style but toolbar buttons, execpt block movers. + &:not(.block-editor-block-mover-button):focus::before { @include block-toolbar-button-style__focus(); } - // Fallback for browsers without :focus-visible support - @supports not selector(:focus-visible) { - &:focus::before { + + // Focus style for block mover buttons (using :focus-visible instead of :focus) + &.block-editor-block-mover-button { + &:focus-visible::before { @include block-toolbar-button-style__focus(); } + // Fallback for browsers without :focus-visible support + @supports not selector(:focus-visible) { + &:focus::before { + @include block-toolbar-button-style__focus(); + } + } } // Ensure the icon buttons remain square.