Function respo::declare_static_style
source · pub fn declare_static_style<T, U>(name: T, rules: &[(U, &RespoStyle)]) -> Stringwhere
T: Into<String> + Clone,
U: Into<String> + Clone + Display,
Expand description
does internal work inside the macro static_style!(name, &styles)
.
inserts CSS as <style .. />
under <head ... />
element
notice that the code only generats once and being cached as DOM states,
NOT working for dynamic styles that changes over time, use inline styles instead.