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