-
-
Notifications
You must be signed in to change notification settings - Fork 83
Closed
Labels
feature requestNew feature or requestNew feature or request
Description
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:
:host(:focus-visible) {}Output:
.js-focus-visible :host(.focus-visible),
:host(.focus-visible).js-focus-visible {}
:host(:focus-visible) {}Expected:
:host(.focus-visible) {}
:host(:focus-visible) {}Validations
- Follow our Code of Conduct
- Check that there isn't already an issue that request the same feature to avoid creating a duplicate.
Would you like to open a PR for this feature?
- I'm willing to open a PR
Metadata
Metadata
Assignees
Labels
feature requestNew feature or requestNew feature or request