MCPcopy Create free account
hub / github.com/datapane/datapane / getCssVar

Function getCssVar

web-components/report/src/theme.ts:8–14  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

6import chroma from "chroma-js";
7
8const getCssVar = (name: string): string => {
9 /**
10 * Get a global CSS variable by name
11 */
12 const varName = getComputedStyle(document.body).getPropertyValue(name);
13 return varName.trim().replace(/["']/g, "");
14};
15
16export const setTheme = (isLightProse?: boolean) => {
17 /**

Callers 1

setThemeFunction · 0.85

Calls 1

replaceMethod · 0.45

Tested by

no test coverage detected