Skip to content

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

Open
@davesnx

Description

@davesnx

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions