Skip to main content

parse_layout_margin_top

Function parse_layout_margin_top 

Source
pub fn parse_layout_margin_top(
    input: &str,
) -> Result<LayoutMarginTop, CssPixelValueParseError<'_>>
Expand description

Parses a LayoutMarginTop attribute from a &str

§Example

assert_eq!(parse_layout_margin_top("5px"), Ok(LayoutMarginTop { inner: PixelValue::px(5.0) }));

§Errors

Returns an error if input is not a valid CSS value for this property.