UNPKG

oui-kit

Version:

🎯 *UI toolkit with a French touch* 🇫🇷

10 lines (9 loc) • 379 B
/// Helper function to resolve CSS variables export function getCSSVariable(varName: string, fallback: string): string { if (typeof window !== 'undefined' && typeof window.getComputedStyle !== 'undefined') { const root = document.documentElement const value = getComputedStyle(root).getPropertyValue(varName).trim() return value || fallback } return fallback }