react-scoped-styles icon indicating copy to clipboard operation
react-scoped-styles copied to clipboard

Parse CSS classes more acurrately with AST parser

Open constgen opened this issue 5 years ago • 1 comments

Use css-tree parser to target only class selectors in CSS. This fixes a lot of problems ones and forever

  • No more false positives in decimal property values. They was detected as classes because of .
  • Allow absent trailing semicolon in last rule in declaration. This have to work as it is valid by CSS spec
  • Better code base flexibility for future features, e.g.: animation names scoping, etc.

Resolves https://github.com/featurematrix/react-scoped-styles/issues/4

@nairinarinyan please build from TypeScript locally and try to make it run successfully. I am not a "friend" of TypeScript and tested it only in pure JavaScript directly in node_modules

constgen avatar Jul 21 '19 15:07 constgen

@nairinarinyan can you merge this please? It resolves many issues in CSS corruption produced by this plugin.

constgen avatar Aug 22 '19 09:08 constgen