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 specificity display for :lang and similar pseudo selectors #268

Conversation

romainmenke
Copy link
Contributor

Screenshot 2022-03-31 at 17 52 40

https://drafts.csswg.org/selectors/#specificity-rules

A few pseudo-classes provide “evaluation contexts” for other selectors, and so have their specificity defined specially:

With this change only those selectors with an evaluation context will have their child nodes counted.

@@ -16,6 +16,14 @@ function copy(from, to) {
}
}

if (!fs.existsSync(path.join(__dirname, '..', 'lib', 'umd'))) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't needed to fix tests, but included to mirror the fix for esm

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be fixed by e6deb0b

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! I'll update my PR! done

@romainmenke romainmenke changed the title fix selector specificity display for :lang fix selector specificity display for :lang and similar pseudo selectors Mar 31, 2022
@aeschli aeschli added this to the April 2022 milestone Apr 8, 2022
@aeschli aeschli self-assigned this Apr 8, 2022
@aeschli aeschli merged commit 24eee1a into microsoft:main Apr 8, 2022
@aeschli
Copy link
Contributor

aeschli commented Apr 8, 2022

Thanks @romainmenke !

@romainmenke romainmenke deleted the fix-selector-specificity-printing-for-lang--exuberant-beaver-a4b601679f branch April 8, 2022 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants