You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Yea, I think compile time verification is the feature which would get me on board with using this project. Great work so far. Stoked to see this project is still making headway.
Howdy, here's some strawman syntax inspired by my own brain and rsx
use css_in_rust::{Px,Color, css};let color:Color = Color::Keyword::Red.into();let width:Px = 100.into();let style = css!{// interpolate variables in rule assignment
background-color:{color};.nested {
background-color: blue;// not necessary, but slightly more ergonomic// shorthand for when variable + rule names the same{width}}};
original (expand)
let style = match css_in_rust::Style::create("Component",// The class prefix// The actual cssr#" background-color: red; .nested { background-color: blue; width: 100px }"#,){Ok(style) => style,Err(error) => {panic!("An error occured while creating the style: {}", error);}};
It would be a neat feature to be informed of Syntax errors in the CSS at compile time.
The text was updated successfully, but these errors were encountered: