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

List of CSS Tokenizers #1

Open
romainmenke opened this issue Jun 23, 2023 · 4 comments
Open

List of CSS Tokenizers #1

romainmenke opened this issue Jun 23, 2023 · 4 comments

Comments

@romainmenke
Copy link
Member

romainmenke commented Jun 23, 2023

This is a list of CSS Tokenizers.
This issue is not intended for in depth discussion about any individual tokenizer or any aspect of CSS tokenizing.

@scripthunter7
Copy link

Hi @romainmenke, thank you for this compilation! We also created a tokenizer for CSS & Extended CSS:
https://www.npmjs.com/package/@adguard/css-tokenizer

A detailed benchmark has also been prepared for the tokenizers listed here. Results can be found at the following link:
https://github.com/AdguardTeam/tsurlfilter/blob/master/packages/css-tokenizer/benchmark/RESULTS.md

Note

Our API and token list is also compatible with the CSSTree's tokenizer API, and in the long term, we plan to integrate the tokenizer library into CSSTree via our ECSSTree library. See this issue for more details.

@romainmenke
Copy link
Member Author

romainmenke commented Oct 31, 2023

Hi @scripthunter7,

Interesting, added to the list!
How does it score on these tests : https://github.com/romainmenke/css-tokenizer-tests

@romainmenke
Copy link
Member Author

test results for @adguard/css-tokenizer https://www.romainmenke.com/css-tokenizer-tests

  • perfect score for widely used CSS in the community (bootstrap, tailwind, ...)
  • a few issues in more exotic CSS
  • it's faster than any other tokenizer currently tested

@Mouvedia
Copy link
Member

Rome used to have a tokenizer: rome/tools#707

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

No branches or pull requests

3 participants