-
-
Notifications
You must be signed in to change notification settings - Fork 930
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix false positives for focus-visible in selector-pseudo-class-no-unknown #3886
Comments
@mo Thanks for the report. Yes, this should be considered known. For those interested, it's in the Level 4 Selector Working Draft. It should just be the case of adding it to this list, if you'd like a submit a PR. |
@jeddy3 If I also wanted to write a testcase, in which file should I put it? |
Each rule has it own test folder within. You should just need to add a FYI, docs on running tests. |
This pseudo class is part of the CSS Level 4 Selector Working Draft: https://www.w3.org/TR/selectors-4/#the-focus-visible-pseudo
This pseudo class is part of the CSS Level 4 Selector Working Draft: https://www.w3.org/TR/selectors-4/#the-focus-visible-pseudo
This pseudo class is part of the CSS Level 4 Selector Working Draft: https://www.w3.org/TR/selectors-4/#the-focus-visible-pseudo
This pseudo class is part of the CSS Level 4 Selector Working Draft: https://www.w3.org/TR/selectors-4/#the-focus-visible-pseudo
Running stylelint 9.9.0 using stylelint-config-recommended on the following file:
...reports the error:
test.css 1:1 ✖ Unexpected unknown pseudo-class selector ":focus-visible" selector-pseudo-class-no-unknown
:focus-visible is a new pseudo class coming in CSS Selectors v4.
It's currently implemented behind a prefix in Firefox and behind a flag in Chrome, see status here:
https://caniuse.com/#search=focus-visible
Chrome implementation is tracked by this bug:
https://bugs.chromium.org/p/chromium/issues/detail?id=817199&desc=3
Some people are already using it via this polyfill:
https://github.com/WICG/focus-visible
It would be nice if stylelint did not report this pseudo class as "unknown".
The text was updated successfully, but these errors were encountered: