-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
ParseError with :is() or :matches() containing :has() #4278
Comments
Hey @SuperPat45! I'm here to help you with any bugs, questions, or contributions you have while waiting for a human maintainer. Let's tackle this issue together! To resolve the ParseError "Missing closing ')'" when using The error occurs because the parser does not correctly handle the nested structure of Here is the corrected CSS code: :is(:not(:has(>.foo)), :has(>.foo.bar)) {
overflow: clip;
} And here is the relevant part of the case 40: // (
parenLevel++;
lastOpeningParen = chunkerCurrentIndex;
continue;
case 41: // )
if (--parenLevel < 0) {
return fail('missing opening `(`', chunkerCurrentIndex);
}
continue; Ensure that the |
Related to: #4268 |
I submitted a PR #4290 The following Less @num: 3;
:nth-child(@{num}) {
selector: interpolated;
}
a:is(.b, :is(.c)) {
color: blue;
}
:is(:not(:has(>.foo)), :has(>.foo.bar)) {
overflow: clip;
} becomes: :nth-child(3) {
selector: interpolated;
}
a:is(.b, :is(.c)) {
color: blue;
}
:is(:not(:has(>.foo)), :has(>.foo.bar)) {
overflow: clip;
} |
To reproduce:
Current behavior:
Throw a:
ParseError: Missing closing ')'
Expected behavior:
No exception has the number of close parenthesis is correct
Environment information:
less
version: 4.2.0nodejs
version: 20.17operating system
: windowsThe text was updated successfully, but these errors were encountered: