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

Generate the CSS runtime (styled-ppx.css) from Parser.re #426

Open
6 tasks
davesnx opened this issue Mar 7, 2024 · 0 comments
Open
6 tasks

Generate the CSS runtime (styled-ppx.css) from Parser.re #426

davesnx opened this issue Mar 7, 2024 · 0 comments

Comments

@davesnx
Copy link
Owner

davesnx commented Mar 7, 2024

With the mechanism of value.rec ppx. It should be doable to generate all the interface to render CSS. Right now value.rec generates the functions to parse CSS into an AST, and it generates the Types as well. We could add another pass to render the AST into strings.

The generated code might look like similar to bs-css, but would be nice to have a few improvements over them:

  • Support entirely the CSS spec (or at least what our Parser.re completly)
  • Try to improve performance on ReScript/Reason
  • Try to reduce the bundle-size
  • Remove all the glue code from declarations_to_emotion (and maybe some css_to_emotion)

Possible step by step

  • Add render to most basic standard tags
  • Implement rendering for variants (render non-properties)
  • Implement the rest of the types (render properties)
  • Check how much CSS support we have
  • Getting rid of bs-css
  • Remove extended properties from the Parser
@davesnx davesnx changed the title Generate a CSS pretty printer out of Parser.re Generate a CSS printer out of Parser.re Mar 7, 2024
@davesnx davesnx changed the title Generate a CSS printer out of Parser.re Generate the CSS runtime (styled-ppx.css) from of Parser.re Mar 12, 2024
@davesnx davesnx changed the title Generate the CSS runtime (styled-ppx.css) from of Parser.re Generate the CSS runtime (styled-ppx.css) from Parser.re Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant