goldies
    Preparing search index...

    Function getCustomCSSVariables

    • Return all custom properties (CSS variables) declared on :root in the document's stylesheets. Stylesheets whose rules can't be read, such as cross-origin ones, are skipped.

      Returns { key: string; value: string }[]

      Array of CSS variable objects with key and value properties

      const allCustomCSSVariables = getCustomCSSVariables()
      // [{ key: '--main-color', value: '#fff' }, ...]