-
Notifications
You must be signed in to change notification settings - Fork 35
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
Some uses of :has
throw "not a valid selector"
#123
Comments
+1ing this, the following selectors also throw "not a valid selector" errors for us in Jest (works fine in browsers): Previous sibling selectors: &:has(+ .classA) {
color: red;
} Nested *:has(*:is(.classA, .classB)) + *:is(.classC, .classD) {
color: red;
} |
@cee-chen The previous sibling selectors work with the version |
it seems to be this MR that caused the regression #98, I can install the latest version and then revert that line and the issue is no longer there |
Line 1025 in ee69b43
but with |
I found two particular use cases of the
:has
selector, which work fine in modern browsers but nwsapi throws an error:div:has(>div)
results in'>div' is not a valid selector
(so having>
at the start of the subselector string is treated as invalid):has(div)
results in'' is not a valid selector
(so having:has
at the start of the selector string seems to result in it being parsed as empty)I believe the selectors above are valid and should be supported, am I wrong?
I should say I'm using version 2.2.12
The text was updated successfully, but these errors were encountered: