Skip to content

Commit 627ca96

Browse files
fix: accent color style application (#291)
1 parent a3c3c2c commit 627ca96

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lib/utils.ts

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,12 @@ export const getAppConfig = cache(async (headers: Headers): Promise<AppConfig> =
7070
// generate a hover color for the accent color by mixing it with 20% black
7171
export function getStyles(appConfig: AppConfig) {
7272
const { accent, accentDark } = appConfig;
73-
const hasCustomAccentColor =
74-
process.env.NODE_ENV === 'development' || accent !== APP_CONFIG_DEFAULTS.accent;
75-
const hasCustomAccentDarkColor =
76-
process.env.NODE_ENV === 'development' || accentDark !== APP_CONFIG_DEFAULTS.accentDark;
7773

7874
return [
79-
hasCustomAccentColor
75+
accent
8076
? `:root { --primary: ${accent}; --primary-hover: color-mix(in srgb, ${accent} 80%, #000); }`
8177
: '',
82-
hasCustomAccentDarkColor
78+
accentDark
8379
? `.dark { --primary: ${accentDark}; --primary-hover: color-mix(in srgb, ${accentDark} 80%, #000); }`
8480
: '',
8581
]

0 commit comments

Comments
 (0)