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-max-specificity false positives with ignoreSelectors option for of <selector> syntax #7475

Merged
merged 2 commits into from Jan 20, 2024

Conversation

ybiquitous
Copy link
Member

@ybiquitous ybiquitous commented Jan 20, 2024

Config:

{"ignoreSelectors": [".foo"]}

CSS code:

:nth-child(even of .foo) {}

/* ↓ Calculates specificity ignoring 'of .foo' in `ignoreSelectors` */
:nth-child(even) {}

Which issue, if any, is this issue related to?

Closes #6615

Is there anything in the PR that needs further explanation?

No, it's self-explanatory.

… option for `of <selector>` syntax

```json
{"ignoreSelectors": [".foo"]}
```

```css
:nth-child(even of .foo) {}

/* ↓ Calculates specificity ignoring 'of .foo' in `ignoreSelectors` */
:nth-child(even) {}
```
Copy link

changeset-bot bot commented Jan 20, 2024

🦋 Changeset detected

Latest commit: 9e0fea0

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
stylelint Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@ybiquitous ybiquitous marked this pull request as ready for review January 20, 2024 09:49
@ybiquitous ybiquitous merged commit 34cdc97 into main Jan 20, 2024
15 of 16 checks passed
@ybiquitous ybiquitous deleted the issue-6615 branch January 20, 2024 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Fix selector-max-specificity false positives with ignoreSelectors option for of <selector> syntax
3 participants