@@ -1486,12 +1486,11 @@ function processConfig(config: CrosswindConfig): ProcessedConfig {
14861486 }
14871487 const spacingValues = spacingCustom ? { ...SPACING_VALUES , ...config . theme . spacing } : SPACING_VALUES
14881488
1489- let colorsOverlay : Record < string , string > | null = null
1489+ const colorDiffs : Record < string , string > = { }
14901490 for ( const [ name , value ] of Object . entries ( config . theme . colors ) ) {
14911491 if ( typeof value === 'string' ) {
14921492 if ( COMMON_COLORS [ name ] !== undefined && COMMON_COLORS [ name ] !== value ) {
1493- colorsOverlay ??= { ...COMMON_COLORS }
1494- colorsOverlay [ name ] = value
1493+ colorDiffs [ name ] = value
14951494 }
14961495 }
14971496 else if ( value && typeof value === 'object' ) {
@@ -1500,12 +1499,12 @@ function processConfig(config: CrosswindConfig): ProcessedConfig {
15001499 continue
15011500 const key = shade === 'DEFAULT' ? name : `${ name } -${ shade } `
15021501 if ( COMMON_COLORS [ key ] !== undefined && COMMON_COLORS [ key ] !== shadeValue ) {
1503- colorsOverlay ??= { ...COMMON_COLORS }
1504- colorsOverlay [ key ] = shadeValue
1502+ colorDiffs [ key ] = shadeValue
15051503 }
15061504 }
15071505 }
15081506 }
1507+ const commonColors = Object . keys ( colorDiffs ) . length > 0 ? { ...COMMON_COLORS , ...colorDiffs } : COMMON_COLORS
15091508
15101509 // Radius/shadow static entries can't be patched cheaply (multi-property
15111510 // outputs), so a customized theme skips the static map and lets the
@@ -1523,7 +1522,7 @@ function processConfig(config: CrosswindConfig): ProcessedConfig {
15231522 config,
15241523 variantEnabled : config . variants as unknown as Record < string , boolean > ,
15251524 spacingValues,
1526- commonColors : colorsOverlay ?? COMMON_COLORS ,
1525+ commonColors,
15271526 skipStaticRadius,
15281527 skipStaticShadow,
15291528 screenBreakpoints : new Map ( Object . entries ( config . theme . screens ) ) ,
0 commit comments