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

we should support stylesheets with errors #188

Open
jogibear9988 opened this issue Aug 27, 2023 · 2 comments
Open

we should support stylesheets with errors #188

jogibear9988 opened this issue Aug 27, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@jogibear9988
Copy link

at the monent a styleshee like this:

  * {
  aa;
  display: block;
  }

or this:

  * {
  aa;
  display: block;
  }

crashes the parser. but we should look if we could still continue parseing and return the valid styles (same as the browser does)

@holblin
Copy link

holblin commented Aug 31, 2023

Yes, I agree, I wonder if at some point some rewrite might be necessary and maybe have some sort of multi-step parsing that will allow general CSS syntax parsing and then try to specifically give them meaning or generate unknown nodes (so that will OOTB support CSS extensions or new CSS rules as long as they are close to general CSS syntax)

@holblin holblin added the enhancement New feature or request label Aug 31, 2023
@jogibear9988
Copy link
Author

If someone would does a rewrite, we could look as how es-module-shim created a very fast lexer https://guybedford.com/es-module-shims-production-import-maps for ideas how this could be done for css.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants