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
Add support for evaluation contexts pseudo-classes in selector-max-specificity #2857
Comments
Thanks for the detailed issue and using our issue template @Hypnosphi 😄 I've marked this up as a bug and I'll submit a PR for this momentarily 🎉 |
:global
and :local
shouldn't count when measuring specificity
@Hypnosphi This can be resolved by adding a new I've updated the labels and title of the issue accordingly. I also have a pending PR that documents this design decision. |
Why any selector containing BTW, looks like |
Yes, you're right. In, #1504 it looks like we underestimated specificity's support for
Yes, until specificity supports it we are best ignoring it outright. |
In fact, I noticed that some other rules use |
True.
I think this is worth pursuing (and in the rule itself, rather than as a plugin, as it should bring Level 4 Is this something that you're willing to explore further and contribute? It might even be worth contributing Level 4 support upstream in the specificity package. |
I think I can give it a try (in this package) |
Fixed in 2279fd5 |
False positive when using CSS modules
selector-max-specificity
8.0.0
CLI with
stylelint --ignore-path .eslintignore '**/*.css'
Yes, it's related to CSS modules
No warnings to be flagged.
The following warnings were flagged:
Ignore
:local
and:global
, as it's done with:not
and:matches
The text was updated successfully, but these errors were encountered: