fix: use attr rather than class for focus-visible polyfill (#1778)

fixes #1777
This commit is contained in:
Nolan Lawson 2020-05-16 14:25:12 -07:00 committed by GitHub
parent cc62000b21
commit beade4aec3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
}