What would you want to propose?
I'd like API to customize the application of .js-focus-visible in the focus-visible-plugin.
The recent upgrade of the focus-vidible-plugin to include .js-focus-visible creates selectors that do not exist when leveraged with CSS targeted for application to shadow DOM. Generally the shadow DOM implementation of the polyfill cannot rely on parent elements having .js-focus-visible and doesn't seem to apply .js-focus-visible to the focused element.
Suggested solution
I'm not sure if a legacy flag is correct, or if a scopedSelector flag would be better, but being able to do the following in some form:
require('postcss-focus-visible')({
scopePolyfilledSelectors: false,
})
Additional context
Input:
Output:
.js-focus-visible :host(.focus-visible),
:host(.focus-visible).js-focus-visible {}
:host(:focus-visible) {}
Expected:
:host(.focus-visible) {}
:host(:focus-visible) {}
Validations
Would you like to open a PR for this feature?
What would you want to propose?
I'd like API to customize the application of
.js-focus-visiblein thefocus-visible-plugin.The recent upgrade of the
focus-vidible-pluginto include.js-focus-visiblecreates selectors that do not exist when leveraged with CSS targeted for application to shadow DOM. Generally the shadow DOM implementation of the polyfill cannot rely on parent elements having.js-focus-visibleand doesn't seem to apply.js-focus-visibleto the focused element.Suggested solution
I'm not sure if a
legacyflag is correct, or if ascopedSelectorflag would be better, but being able to do the following in some form:Additional context
Input:
Output:
Expected:
Validations
Would you like to open a PR for this feature?