This repository has been archived on 2026-03-31. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
alchemy/macros
2019-05-28 16:48:04 -07:00
..
src New reconciler finally renders, just need to do some cleanup then can finally move on 2019-05-28 16:48:04 -07:00
Cargo.toml Guess I should put this under version control LOL 2019-05-23 22:11:07 -07:00
README.md Guess I should put this under version control LOL 2019-05-23 22:11:07 -07:00

Alchemy-Macros

This crate holds macros for two things, primarily:

  • rsx! {}, which transforms <View></<View> tags into their proper RSX calls. Much of this is forked from the awesome work done by Bodil Stokke in typed-html.
  • styles! {}, which transforms CSS style nodes into Vec<Styles>, which the rendering engine uses to theme and style nodes. This relies on the CSS Parser from Servo. Styles do not support cascading; this is a design decision, as inheritance is already a bit of a taboo in Rust, so to do it in styling code feels really odd and involves a mental shift the deeper you go. Opt to apply successive style keys, conditionally if need be, to achieve the same thing with a compositional approach.

Questions, Comments?

Open an issue, or hit me up on Twitter.