[−][src]Function azul_css_parser::parse_combined_css_property
pub fn parse_combined_css_property<'a>(
key: CombinedCssPropertyType,
value: &'a str
) -> Result<Vec<CssProperty>, CssParsingError<'a>>
Parses a combined CSS property or a CSS property shorthand, for example "margin" (as a shorthand for setting all four properties of "margin-top", "margin-bottom", "margin-left" and "margin-right")
assert_eq!( azul_css_parser::parse_combined_css_property(CombinedCssPropertyType::BorderRadius, "10px"), Ok(vec![ CssProperty::BorderTopLeftRadius(CssPropertyValue::Exact(StyleBorderTopLeftRadius::px(10.0))), CssProperty::BorderTopRightRadius(CssPropertyValue::Exact(StyleBorderTopRightRadius::px(10.0))), CssProperty::BorderBottomLeftRadius(CssPropertyValue::Exact(StyleBorderBottomLeftRadius::px(10.0))), CssProperty::BorderBottomRightRadius(CssPropertyValue::Exact(StyleBorderBottomRightRadius::px(10.0))), ]) )