Skip to content

Commit

Permalink
Fix app-theme-color not following header color (#20758)
Browse files Browse the repository at this point in the history
* Fix app-theme-color not following header color

* Revert incorrect fix for #20671 that only applies when a primary color is set by the user
  • Loading branch information
Nezz authored May 22, 2024
1 parent 0b6994d commit 19f94ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/common/dom/apply_themes_on_element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,11 @@ export const applyThemesOnElement = (
const accentColor = themeSettings?.accentColor;

if (darkMode && primaryColor) {
themeRules["app-theme-color"] = hexBlend(primaryColor, "#121212", 8);
themeRules["app-header-background-color"] = themeRules["app-theme-color"];
themeRules["app-header-background-color"] = hexBlend(
primaryColor,
"#121212",
8
);
}

if (primaryColor) {
Expand Down
2 changes: 1 addition & 1 deletion src/resources/styles-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export const derivedStyles = {
"mdc-theme-error": "var(--error-color)",
"app-header-text-color": "var(--text-primary-color)",
"app-header-background-color": "var(--primary-color)",
"app-theme-color": "var(--primary-color)",
"app-theme-color": "var(--app-header-background-color)",
"mdc-checkbox-unchecked-color": "rgba(var(--rgb-primary-text-color), 0.54)",
"mdc-checkbox-disabled-color": "var(--disabled-text-color)",
"mdc-radio-unchecked-color": "rgba(var(--rgb-primary-text-color), 0.54)",
Expand Down

0 comments on commit 19f94ff

Please sign in to comment.