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 order in pseudo :is #278

Conversation

romainmenke
Copy link
Member

@romainmenke romainmenke commented Feb 25, 2022

Pseudo elements ordering appears important : w3c/csswg-drafts#7085 (comment)

With re-ordering in compound selectors we broke this in :is()


Before this change :

:is(a, button):is(:hover::before, :focus) {
	order: 25;
}

/* becomes */

button::before:hover {
	order: 26;
}

After this change :

:is(a, button):is(:hover::before, :focus) {
	order: 25;
}

/* becomes */

button:hover::before {
	order: 26;
}

Also added a test in nesting to prevent introducing the same bug in the future and clarified a few comments.

Copy link
Member

@Antonio-Laguna Antonio-Laguna left a comment

Choose a reason for hiding this comment

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

Nice one! Thanks for fixing this!

@Antonio-Laguna Antonio-Laguna merged commit c07af0a into main Feb 26, 2022
@Antonio-Laguna Antonio-Laguna deleted the fix-selector-order-in-pseudo-is--sympathetic-duck-5ffec5fdfc branch February 26, 2022 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants