fix(searchbar): clear button has focus indicator (#25828)

This commit is contained in:
Liam DeBeasi
2022-08-26 14:35:58 -05:00
committed by GitHub
parent c270756356
commit 373b4ffe21
2 changed files with 18 additions and 0 deletions

View File

@ -147,6 +147,13 @@
appearance: none; appearance: none;
} }
/**
* Normally, we would not want to use :focus
* here because that would mean tapping the button
* on mobile would focus it (and keep it focused).
* However, the clear button always disappears after
* being activated, so we never get to that state.
*/
.input-clear-icon:focus { .input-clear-icon:focus {
opacity: 0.5; opacity: 0.5;
} }

View File

@ -145,6 +145,17 @@
appearance: none; appearance: none;
} }
/**
* Normally, we would not want to use :focus
* here because that would mean tapping the button
* on mobile would focus it (and keep it focused).
* However, the clear button always disappears after
* being activated, so we never get to that state.
*/
.searchbar-clear-button:focus {
opacity: 0.5;
}
:host(.searchbar-has-value.searchbar-should-show-clear) .searchbar-clear-button { :host(.searchbar-has-value.searchbar-should-show-clear) .searchbar-clear-button {
display: block; display: block;
} }