Skip to content

Commit

Permalink
fix: use attr rather than class for focus-visible polyfill (nolanlaws…
Browse files Browse the repository at this point in the history
  • Loading branch information
nolanlawson authored and Alexis Werefox committed Apr 3, 2023
1 parent ba4a519 commit 20e8fe8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/build/template.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,12 @@
<style id="theFocusVisibleStyle" media="all">
/* :focus-visible styles */
/* polyfill */
.js-focus-visible :focus:not(.focus-visible) {
/* Note we have to use [data-focus-visible-added] rather than .focus-visible because
* Svelte overrides classes */
.js-focus-visible :focus:not([data-focus-visible-added]) {
outline: none !important; /* important to win the specificity war */
}
.js-focus-visible :focus:not(.focus-visible).focus-after::after {
.js-focus-visible :focus:not([data-focus-visible-added]).focus-after::after {
display: none;
}

Expand Down

0 comments on commit 20e8fe8

Please sign in to comment.