class!() { /* proc-macro */ }Expand description
The class! macro for defining CSS classes with style properties.
Each class definition creates a CssClass function that can be used
in html! via the class: attribute. Styles are automatically injected
into the DOM on first use.
ⓘ
class! {
pub container {
max_width: "800px";
margin: "0 auto";
}
pub(crate) header {
font_size: "28px";
}
hidden {
display: "none";
}
}