Macro wasm_css::style_checked
source ยท macro_rules! style_checked { ($css:expr $(, $arg:expr)*) => { ... }; ($class:expr $(, $arg:expr)*) => { ... }; }
Expand description
Construct a Style from a CSS string with formatting, returning a
WasmCssError of the invalid line if encountered during parsing
-
Generates random class name if one is not provided, returns
WasmCssErrorif unable to locate Crypto when generating uuid for class name -
Returns
WasmCssErrorif unable to locate Window
style_checked!(css: &str) -> Result<Style, WasmCssError>
style_checked!(class: &str, css: &str) -> Result<Style, WasmCssError>Example Usage:
style_checked!(
"
gap: {}rem;
display: flex;
flex-direction: column;
",
gap_size
)?;