for (const colorVariable of colorVariables) { const { path, value } = colorVariable; const variable = String(path[0]).trim().toLowerCase().replaceAll(" ", "-"); const mode = path[1]; const variableName = `${sppbColorVariablePrefix}-${variable}`; if (activeColorMode === mode) { colorVariableData.push(`${variableName}: ${value}`); } } document.documentElement.style.cssText += colorVariableData.join(";"); } }; window.sppbColorVariables = []; initColorMode(); document.addEventListener("DOMContentLoaded", initColorMode);
News & Events