//! for situations where you have a set of components, //! and you want to register the classes you use from different files without too much complexity use zephyr::{register_class, Zephyr}; fn main() { let z = Zephyr::new(); let generated_css = z.generate_from_inventory(); let head = head(&generated_css); let header = header(); let body = body(); let html = format!( r#" {head}
{header} {body} "# ); std::fs::write("./examples/index.html", html).unwrap(); } fn head(generated_css: &str) -> String { format!( r#" "# ) } fn header() -> String { let class = register_class!("color[#e20f00] color[green]hover content['*']$before"); format!( r#"this text is red, but green on hover
"# ) } fn body() -> String { let class = register_class!("mt[10rem] content[attr(after)]$after color[red]$after"); format!( r#"this text has a lot of margin
"# ) }