[−][src]Function sauron::html::attributes::styles
pub fn styles<V, MSG, P>(
pairs: P
) -> Attribute<&'static str, &'static str, AttributeValue, Event, MSG> where
P: AsRef<[(&'static str, V)]>,
V: Into<Value> + Clone,
A helper function which creates a style attribute by assembling the tuples into a string for the style value.
ⓘ
div(vec![styles([("display", "flex"), ("flex-direction", "row")])], vec![])
is the same way of writing
ⓘ
div(vec![style!{"display":"flex","flex-direction":"row"}],vec![])