From ccbd89c908fe8af54c7d723dd12da5b7f3906c8f Mon Sep 17 00:00:00 2001 From: Benjamin Canac Date: Mon, 3 Mar 2025 19:34:30 +0100 Subject: [PATCH] fix(templates): prevent overriding existing colors Resolves #3426 --- src/templates.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/templates.ts b/src/templates.ts index d797a5aaef..657f392487 100644 --- a/src/templates.ts +++ b/src/templates.ts @@ -87,7 +87,7 @@ export function getTemplates(options: ModuleOptions, uiConfig: Record [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950].map(shade => `--color-${color}-${shade}: var(--ui-color-${color}-${shade});`).join('\n\t')).join('\n\t')} + ${[...(options.theme?.colors || []).filter(color => !colors[color as keyof typeof colors]), 'neutral'].map(color => [50, 100, 200, 300, 400, 500, 600, 700, 800, 900, 950].map(shade => `--color-${color}-${shade}: var(--ui-color-${color}-${shade});`).join('\n\t')).join('\n\t')} } ` })