Skip to main content

parse_duration_ms

Function parse_duration_ms 

Source
pub fn parse_duration_ms(
    ctx: &str,
    name: &str,
    raw: &str,
) -> Result<u32, ParseError>
Expand description

Parse a CSS duration (Nms or Ns) into whole milliseconds. Shared by every duration-valued property in the cascade (transition-duration, caret-blink, scrollbar-fade-delay, scrollbar-fade-duration, …); pub so the markup parser (lumenc::parse::html, a separate crate) reuses the same parser instead of duplicating the unit handling for its mirrored inline-attribute table.