Skip to content

Parse CSS classes more acurrately with AST parser#6

Open
constgen wants to merge 5 commits intonairinarinyan:masterfrom
constgen:css-ast-parser
Open

Parse CSS classes more acurrately with AST parser#6
constgen wants to merge 5 commits intonairinarinyan:masterfrom
constgen:css-ast-parser

Conversation

@constgen
Copy link
Contributor

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 #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
Copy link
Contributor Author

constgen commented Aug 22, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

If css containes a style without semicolon, building fails

2 participants