postcss-selector-parser
postcss-selector-parser copied to clipboard
API to return whether a selector has non-standard syntax.
- add a strict parse mode so that any non-standard syntax is an immediate error.
- When not strict, it should be possible to find which nodes contain non standard syntax and for complex nodes like Attribute, which part(s) are violating the css spec.
@chriseppstein Also maybe we can support non standard comments //?
I'd rather postcss filter that out so that it's not part of the rule's selector value.
https://github.com/postcss/postcss/issues/1149
TIL about postcss-scss. I think the selector parser and tokenizer should be updated to have a syntax option and then the parser should non-standard syntax correctly or error out based on the current syntax setting. Right now it's all mashed together and unpredictable.