UNPKG

funuicss

Version:

React and Next.js component UI Library for creating Easy and good looking websites with fewer lines of code. Elevate your web development experience with our cutting-edge React/Next.js component UI Library. Craft stunning websites effortlessly, boasting b

12 lines (11 loc) 516 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getCssVariableValue = getCssVariableValue; function getCssVariableValue(name) { if (typeof window === 'undefined' || typeof getComputedStyle === 'undefined') { return ''; // or throw an error / return a fallback } var variableName = name.startsWith('--') ? name : "--".concat(name); var rootStyles = getComputedStyle(document.documentElement); return rootStyles.getPropertyValue(variableName).trim(); }