Function sauron::html::attributes::styles[][src]

pub fn styles<V, MSG, P>(
    pairs: P
) -> Attribute<&'static str, &'static str, AttributeValue, Callback<Event, MSG>> where
    V: Into<Value> + Clone,
    P: AsRef<[(&'static str, V)]>, 
Expand description

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![])