Function parse_style_background_size

Source
pub fn parse_style_background_size<'a>(
    input: &'a str,
) -> Result<StyleBackgroundSize, InvalidValueErr<'a>>
Expand description

Parses a StyleBackgroundSize attribute from a &str

ยงExample

assert_eq!(parse_style_background_size("contain"), Ok(StyleBackgroundSize::Contain));
assert_eq!(parse_style_background_size("cover"), Ok(StyleBackgroundSize::Cover));