Skip to content

Commit 9d83108

Browse files
committed
fix: chrome-button focus ring consistency
1 parent a1899e9 commit 9d83108

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

src/js/media-chrome-button.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,16 @@ template.innerHTML = `
3737
Only show outline when keyboard focusing.
3838
https://drafts.csswg.org/selectors-4/#the-focus-visible-pseudo
3939
*/
40-
:host-context([media-keyboard-control]):host(:focus),
41-
:host-context([media-keyboard-control]):host(:focus-within) {
40+
:host(:focus-visible) {
4241
box-shadow: inset 0 0 0 2px rgba(27, 127, 204, 0.9);
42+
outline: 0;
43+
}
44+
/*
45+
* hide default focus ring, particularly when using mouse
46+
*/
47+
:host(:where(:focus)) {
48+
box-shadow: none;
49+
outline: 0;
4350
}
4451
4552
:host(:hover) {

0 commit comments

Comments
 (0)