ixfx
    Preparing search index...

    Function getCssVariable

    • Gets a CSS variable.

      // Fetch --accent variable, or use `yellow` if not found.
      getCssVariable(`accent`, `yellow`);

      Parameters

      • name: string

        Name of variable. Leading '--' is unnecessary

      • fallbackColour: string = ...

        Fallback colour if not found

      • Optionalroot: HTMLElement

        Element to search variable from

      Returns string

      Colour or fallback.