-
Notifications
You must be signed in to change notification settings - Fork 24
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
Previous sibling selectors incorrectly parsed without whitespace #69
Comments
I tried to reproduce your issue but failed. |
Okay I was anonymizing the input and apparently this only repros when the selector is so here's one that fails for me: |
I wonder if the tokenizer is trying to output a unicode token there? https://github.com/phax/ph-css/blob/master/ph-css/src/main/jjtree/ParserCSS30.jjt#L315 |
Hahaha - good catch. I need to check this - interesting.... |
Ping - is there anything I can do to help here? FWIW we don't allow for face rules where we do this parsing, so we could drop that token type and it would be fine. Or perhaps that rule needs to move up to the parser level? |
Good question - honestly I don't know. This is a very stupid error and requires quite some work in the lexer, because it is very specific to CSS expressions (declaration values). I simply didn't have the time to do this yet..... |
Okay if I find the time I'll try and fix this. I think there may need to be a special lexical state for declarations... |
Yes excatly - but the duplicates are quite high - so a lot is the same for "standard" and "declaration values". Lexical states are e.g. already used for comments. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@rockwotj how high are the chances, you will be able to provide something here? |
Not anytime soon unfortunately 😔 |
Thanks for the swift response - levaing this one open for now |
I have browser compliant mode turned on and the following CSS is incorrectly parsed:
But the following works fine
But it seems like when you ask for optimized output for
div + p .foo{width: 100vw}
you getdiv+p .foo{width:100vw}
which means those rules don't roundtrip properly? It seems to handle~
and>
correctly however?The error message says:
The text was updated successfully, but these errors were encountered: