MCPcopy Create free account
hub / github.com/continuedev/continue / getRecursiveVar

Function getRecursiveVar

gui/src/styles/theme.ts:212–216  ·  view source on GitHub ↗
(vars: string[], defaultColor: string)

Source from the content-addressed store, hash-verified

210// Generates recursive CSS variable fallback for a given color name
211// e.g. var(--vscode-button-background, var(--vscode-button-foreground, #ffffff))
212export const getRecursiveVar = (vars: string[], defaultColor: string) => {
213 return [...vars].reverse().reduce((curr, varName) => {
214 return `var(${varName}, ${curr})`;
215 }, defaultColor);
216};
217
218export const varWithFallback = (colorName: keyof typeof THEME_COLORS) => {
219 const themeVals = THEME_COLORS[colorName];

Callers 2

theme.test.tsFile · 0.90
varWithFallbackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected