Skip to content
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

Parse CSS classes more acurrately with AST parser #6

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

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