• Tries to get the font-weight from CSSStyleDeclaration and transform it into some numeric representation. If the font-weight is unset or cannot be parsed, undefined is returned.

    Regarding relative font-weight-names (lighter, bolder), a normal weighted parent is assumed.

    Parameters

    • style: CSSStyleDeclaration

    Returns undefined | number