Skip to main content

parse_clip_rect

Function parse_clip_rect 

Source
pub fn parse_clip_rect<'a>(
    input: &'a str,
) -> Result<StyleClipRect, StyleClipRectParseError<'a>>
Expand description

Parses a StyleClipRect from a string slice.

Accepts:

  • auto — equivalent to rect(auto, auto, auto, auto).
  • rect(<top>, <right>, <bottom>, <left>) — comma-separated form.
  • rect(<top> <right> <bottom> <left>) — legacy space-separated form.

Each edge is either auto or a <length>. Negative lengths are permitted.