12 lines
343 B
JavaScript
12 lines
343 B
JavaScript
const style = process.browser && document.getElementById('theFocusVisibleStyle')
|
|
|
|
export function focusRingObservers (store) {
|
|
if (!process.browser) {
|
|
return
|
|
}
|
|
|
|
store.observe('alwaysShowFocusRing', alwaysShowFocusRing => {
|
|
style.setAttribute('media', alwaysShowFocusRing ? 'only x' : 'all') // disable or enable the style
|
|
})
|
|
}
|