macro_rules! jss {
($($tokens:tt)+) => { ... };
}Expand description
Creates css using json notation
use jss::jss;
let css = jss!(
".layer": {
background_color: "red",
border: "1px solid green",
},
".hide .layer": {
opacity: 0,
},
);
let expected =
r#".layer{background-color:red;border:1px solid green;}.hide .layer{opacity:0;}"#;
assert_eq!(expected, css);