From 1300467f93a88dda157979c8335c82d9943981d1 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Fri, 22 Dec 2023 01:37:01 +0100 Subject: [PATCH] fix(theming): Invert filter should be based on primary-element Signed-off-by: Ferdinand Thiessen --- apps/theming/lib/Themes/CommonThemeTrait.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/theming/lib/Themes/CommonThemeTrait.php b/apps/theming/lib/Themes/CommonThemeTrait.php index 85172f1e9bcad..db92d400b3223 100644 --- a/apps/theming/lib/Themes/CommonThemeTrait.php +++ b/apps/theming/lib/Themes/CommonThemeTrait.php @@ -54,8 +54,8 @@ protected function generatePrimaryVariables(string $colorMainBackground, string // ⚠️ Using 'no' as a value to make sure we specify an // invalid one with no fallback. 'unset' could here fallback to some // other theme with media queries - '--primary-invert-if-bright' => $this->util->invertTextColor($this->primaryColor) ? 'invert(100%)' : 'no', - '--primary-invert-if-dark' => $this->util->invertTextColor($this->primaryColor) ? 'no' : 'invert(100%)', + '--primary-invert-if-bright' => $this->util->invertTextColor($colorPrimaryElement) ? 'invert(100%)' : 'no', + '--primary-invert-if-dark' => $this->util->invertTextColor($colorPrimaryElement) ? 'no' : 'invert(100%)', '--color-primary' => $this->primaryColor, '--color-primary-default' => $this->defaultPrimaryColor,