MCPcopy Create free account
hub / github.com/codag-megalith/codag-visualizer / resolveCSSVariable

Function resolveCSSVariable

frontend/src/webview-client/export.ts:32–40  ·  view source on GitHub ↗
(value: string)

Source from the content-addressed store, hash-verified

30}
31
32function resolveCSSVariable(value: string): string {
33 if (!value.startsWith('var(')) return value;
34
35 const varName = value.match(/var\((--[^,)]+)/)?.[1];
36 if (!varName) return value;
37
38 const resolved = getComputedStyles().getPropertyValue(varName).trim();
39 return resolved || value;
40}
41
42/**
43 * Get bounds for all content or a specific workflow group

Callers 3

prepareSVGForExportFunction · 0.85
svgToBase64Function · 0.85
addWorkflowExportButtonsFunction · 0.85

Calls 1

getComputedStylesFunction · 0.85

Tested by

no test coverage detected