Function parseCssMagnitude

  • Parse a magnitude value (e.g. width, height, left, top) from a CSS attribute value. Returns the given default value (or undefined) if the value cannot be determined, e.g. because it is a relative value like 50% or auto.

    Parameters

    • value: null | string
    • defaultValue: number

    Returns number