MCPcopy Create free account
hub / github.com/Acode-Foundation/Acode / buildTheme

Function buildTheme

src/cm/rainbowBrackets.ts:118–128  ·  view source on GitHub ↗
(colors: readonly string[])

Source from the content-addressed store, hash-verified

116}
117
118function buildTheme(colors: readonly string[]) {
119 const themeSpec: Record<string, { color: string }> = {};
120
121 colors.forEach((color, index) => {
122 const selector = `.cm-rainbowBracket-${index}`;
123 themeSpec[selector] = { color: `${color} !important` };
124 themeSpec[`${selector} span`] = { color: `${color} !important` };
125 });
126
127 return EditorView.baseTheme(themeSpec);
128}
129
130export function getRainbowBracketColors(
131 themeConfig: RainbowBracketThemeConfig = {},

Callers 1

rainbowBracketsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected