From d6b825070fc697a59a48cbe57139ea86a2efe0e7 Mon Sep 17 00:00:00 2001 From: Kelly Dwan Date: Fri, 12 Jan 2024 13:02:13 -0500 Subject: [PATCH] Search: Fix focus and active states on search button The focus styles should be on `:focus` to apply when the button is clicked. Remove the border from `:active` to fix a layout shift. Fixes #117. --- .../themes/wporg-parent-2021/sass/blocks/_search.scss | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/source/wp-content/themes/wporg-parent-2021/sass/blocks/_search.scss b/source/wp-content/themes/wporg-parent-2021/sass/blocks/_search.scss index e4502c7c..32e7474e 100644 --- a/source/wp-content/themes/wporg-parent-2021/sass/blocks/_search.scss +++ b/source/wp-content/themes/wporg-parent-2021/sass/blocks/_search.scss @@ -132,16 +132,14 @@ .wp-block-search__input, .wp-block-search__button { &:focus { - outline: none; - outline-offset: unset; - background-color: var(--wp--custom--form--search--color--background); - } - - &:focus-visible { outline: 1.5px solid var(--local--focus--outline-color); outline-offset: -1.5px; box-shadow: inset 0 0 0 3px var(--local--focus--border-color); } + + &:active { + border: none; + } } &.wp-block-search__icon-button .wp-block-search__button {