pub fn parse_css_property<'a>(
key: CssPropertyType,
value: &'a str,
) -> Result<CssProperty, CssParsingError<'a>>
Expand description
Main parsing function, takes a stringified key / value pair and either returns the parsed value or an error
assert_eq!(
azul_css_parser::parse_css_property(CssPropertyType::Width, "500px"),
Ok(CssProperty::Width(CssPropertyValue::Exact(LayoutWidth(PixelValue::px(500.0)))))
)