From 264adf0c3bb8876dde04b2fb93c5554aae91aa9c Mon Sep 17 00:00:00 2001 From: John Molakvoæ Date: Thu, 12 May 2022 11:23:11 +0200 Subject: Fix profile and add gradient-primary-background MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ --- .../src/components/PersonalInfo/ProfileSection/ProfilePreviewCard.vue | 2 +- apps/theming/lib/Themes/DefaultTheme.php | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'apps') diff --git a/apps/settings/src/components/PersonalInfo/ProfileSection/ProfilePreviewCard.vue b/apps/settings/src/components/PersonalInfo/ProfileSection/ProfilePreviewCard.vue index ef12d511fb9..afd85269720 100644 --- a/apps/settings/src/components/PersonalInfo/ProfileSection/ProfilePreviewCard.vue +++ b/apps/settings/src/components/PersonalInfo/ProfileSection/ProfilePreviewCard.vue @@ -162,7 +162,7 @@ export default { height: 70px; border-radius: var(--border-radius-large) var(--border-radius-large) 0 0; background-color: var(--color-primary); - background-image: linear-gradient(40deg, var(--color-primary) 0%, var(--color-primary-element-light) 100%); + background-image: var(--gradient-primary-background); span { bottom: 0; diff --git a/apps/theming/lib/Themes/DefaultTheme.php b/apps/theming/lib/Themes/DefaultTheme.php index 180b1106595..58983d29df1 100644 --- a/apps/theming/lib/Themes/DefaultTheme.php +++ b/apps/theming/lib/Themes/DefaultTheme.php @@ -121,6 +121,8 @@ class DefaultTheme implements ITheme { '--color-primary-element-hover' => $this->util->mix($this->util->elementColor($this->primaryColor), $colorMainBackground, 80), '--color-primary-element-light' => $this->util->lighten($this->util->elementColor($this->primaryColor), 15), '--color-primary-element-lighter' => $this->util->mix($this->util->elementColor($this->primaryColor), $colorMainBackground, -70), + // to use like this: background-image: var(--gradient-primary-background); + '--gradient-primary-background' => 'linear-gradient(40deg, var(--color-primary) 0%, var(--color-primary-element-light) 100%)', // max contrast for WCAG compliance '--color-main-text' => $colorMainText, -- cgit v1.2.3