From bcb72d83b88e5367d05f580b2ea2414011fad7d4 Mon Sep 17 00:00:00 2001 From: Nicooow <46629108+Nicooow@users.noreply.github.com> Date: Tue, 30 Apr 2024 14:03:19 +0200 Subject: [PATCH] Fix an inconsistency in dark mode (#20671) * add app-theme-color var * Fix Prettier format * Fix regression on default dark theme * prevent duplicate calculation --- src/common/dom/apply_themes_on_element.ts | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/common/dom/apply_themes_on_element.ts b/src/common/dom/apply_themes_on_element.ts index cf431b6cb8..ee977cb498 100644 --- a/src/common/dom/apply_themes_on_element.ts +++ b/src/common/dom/apply_themes_on_element.ts @@ -61,11 +61,8 @@ export const applyThemesOnElement = ( const accentColor = themeSettings?.accentColor; if (darkMode && primaryColor) { - themeRules["app-header-background-color"] = hexBlend( - primaryColor, - "#121212", - 8 - ); + themeRules["app-theme-color"] = hexBlend(primaryColor, "#121212", 8); + themeRules["app-header-background-color"] = themeRules["app-theme-color"]; } if (primaryColor) {