Function hyphenateCSS

  • Hyphenates a camel-cased CSS property key.

    Applicable to the names of HTMLElement.style properties, including vendor-specific ones.

    Prepends hyphen to leading capital letters, e.g. to vendor-specific prefixes. Replaces ms- prefix with -ms- one.

    Caches hyphenated names for the sake of speed.

    Parameters

    • name: string

      Camel-cased CSS property name to hyphenate.

    Returns string

    Hyphenated CSS property name.

Generated using TypeDoc