Skip to main content

coerce_positive_length

Function coerce_positive_length 

Source
pub(crate) fn coerce_positive_length(
    value: &SetValue,
    em_pt: f64,
    key: &str,
    value_span: &SourceSpan,
    diagnostics: &mut Vec<Diagnostic>,
) -> Option<f64>
Expand description

Coerce a #image(width|height: ...) argument to a strictly positive length in points. Bare numerics resolve as pt for ergonomics.