Skip to content
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 selector-pseudo-element-no-unknown false positives for ::highlight #6366

Closed
jathak opened this issue Sep 27, 2022 · 1 comment · Fixed by #6367
Closed

Fix selector-pseudo-element-no-unknown false positives for ::highlight #6366

jathak opened this issue Sep 27, 2022 · 1 comment · Fixed by #6367
Labels
status: wip is being worked on by someone type: bug a problem with a feature or rule

Comments

@jathak
Copy link
Contributor

jathak commented Sep 27, 2022

What steps are needed to reproduce the bug?

Code like

::highlight(a) {
  background-color: green;
}

What Stylelint configuration is needed to reproduce the bug?

{
  "rules": {
    "selector-pseudo-element-no-unknown": true
  }
}

How did you run Stylelint?

Online Demo

Which version of Stylelint are you using?

14.12.1

What did you expect to happen?

No problems to be reported.

What actually happened?

The following problem was reported:

1:1-12    Unexpected unknown pseudo-element selector "::highlight" (selector-pseudo-element-no-unknown)

This pseudo-element is part of the CSS Custom Highlight API and was shipped in Chrome 105.

Does the bug relate to non-standard syntax?

No response

Proposal to fix the bug

PR incoming

@ybiquitous
Copy link
Member

@jathak Thanks for providing the precise reproduction. I've copied and pasted an "Online Demo" link in this issue description. Also, thank you for creating a quick-fix PR. I'll soon review it.

@ybiquitous ybiquitous added status: wip is being worked on by someone type: bug a problem with a feature or rule labels Sep 28, 2022
@jeddy3 jeddy3 changed the title ::highlight not recognized as a valid pseudo-element Fix selector-pseudo-element-no-unknown false positives for ::highlight Sep 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: wip is being worked on by someone type: bug a problem with a feature or rule
2 participants