postcss-selector-parser icon indicating copy to clipboard operation
postcss-selector-parser copied to clipboard

API to return whether a selector has non-standard syntax.

Open chriseppstein opened this issue 7 years ago • 3 comments

  1. add a strict parse mode so that any non-standard syntax is an immediate error.
  2. 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 avatar Mar 29 '18 22:03 chriseppstein

@chriseppstein Also maybe we can support non standard comments //?

alexander-akait avatar Mar 30 '18 09:03 alexander-akait

I'd rather postcss filter that out so that it's not part of the rule's selector value.

chriseppstein avatar Mar 30 '18 09:03 chriseppstein

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.

chriseppstein avatar May 16 '18 18:05 chriseppstein