summaryrefslogtreecommitdiffstats
path: root/apps/theming
diff options
context:
space:
mode:
authorJohn Molakvoæ <skjnldsv@protonmail.com>2023-05-04 12:26:42 +0200
committerJohn Molakvoæ <skjnldsv@protonmail.com>2023-05-04 13:02:53 +0200
commit4d3b49b09a8728fedc243fbf378dee6c06d5c8f2 (patch)
treee17e77cbc0ef6b3b34fdd953afadaa5e53184177 /apps/theming
parent74461a9479cdc37691fa3f7500013fcdbfc61898 (diff)
downloadnextcloud-server-4d3b49b09a8728fedc243fbf378dee6c06d5c8f2.tar.gz
nextcloud-server-4d3b49b09a8728fedc243fbf378dee6c06d5c8f2.zip
fix(theming): replace `color-primary-text-dark` with `color-primary-element-text-dark`
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'apps/theming')
-rw-r--r--apps/theming/css/default.css2
-rw-r--r--apps/theming/lib/Themes/CommonThemeTrait.php8
2 files changed, 5 insertions, 5 deletions
diff --git a/apps/theming/css/default.css b/apps/theming/css/default.css
index 3b732f1af3e..4cb9b85a293 100644
--- a/apps/theming/css/default.css
+++ b/apps/theming/css/default.css
@@ -63,7 +63,7 @@
--color-primary-light: #e5f0f5;
--color-primary-light-text: #002a41;
--color-primary-light-hover: #dbe5ea;
- --color-primary-text-dark: #ededed;
+ --color-primary-element-text-dark: #ededed;
--color-primary-element: #006aa3;
--color-primary-element-default-hover: #329bd3;
--color-primary-element-text: #ffffff;
diff --git a/apps/theming/lib/Themes/CommonThemeTrait.php b/apps/theming/lib/Themes/CommonThemeTrait.php
index cd721026923..e7c556e10e0 100644
--- a/apps/theming/lib/Themes/CommonThemeTrait.php
+++ b/apps/theming/lib/Themes/CommonThemeTrait.php
@@ -39,8 +39,8 @@ trait CommonThemeTrait {
*/
protected function generatePrimaryVariables(string $colorMainBackground, string $colorMainText): array {
$isBrightColor = $this->util->isBrightColor($colorMainBackground);
- $colorPrimaryLight = $this->util->mix($this->primaryColor, $colorMainBackground, -80);
$colorPrimaryElement = $this->util->elementColor($this->primaryColor, $isBrightColor);
+ $colorPrimaryLight = $this->util->mix($colorPrimaryElement, $colorMainBackground, -80);
$colorPrimaryElementDefault = $this->util->elementColor($this->defaultPrimaryColor);
$colorPrimaryElementLight = $this->util->mix($colorPrimaryElement, $colorMainBackground, -80);
@@ -62,16 +62,16 @@ trait CommonThemeTrait {
'--color-primary-light' => $colorPrimaryLight,
'--color-primary-light-text' => $this->util->mix($this->primaryColor, $this->util->invertTextColor($colorPrimaryLight) ? '#000000' : '#ffffff', -20),
'--color-primary-light-hover' => $this->util->mix($colorPrimaryLight, $colorMainText, 90),
- '--color-primary-text-dark' => $this->util->darken($this->util->invertTextColor($this->primaryColor) ? '#000000' : '#ffffff', 7),
// used for buttons, inputs...
'--color-primary-element' => $colorPrimaryElement,
'--color-primary-element-hover' => $this->util->mix($colorPrimaryElement, $colorMainBackground, 60),
+ '--color-primary-element-text' => $this->util->invertTextColor($colorPrimaryElement) ? '#000000' : '#ffffff',
+ // used for hover/focus states
+ '--color-primary-element-light' => $colorPrimaryElementLight,
'--color-primary-element-light-hover' => $this->util->mix($colorPrimaryElementLight, $colorMainText, 90),
'--color-primary-element-light-text' => $this->util->mix($colorPrimaryElement, $this->util->invertTextColor($colorPrimaryElementLight) ? '#000000' : '#ffffff', -20),
- '--color-primary-element-light' => $colorPrimaryElementLight,
'--color-primary-element-text-dark' => $this->util->darken($this->util->invertTextColor($colorPrimaryElement) ? '#000000' : '#ffffff', 7),
- '--color-primary-element-text' => $this->util->invertTextColor($colorPrimaryElement) ? '#000000' : '#ffffff',
// default global primary element hover. To be used with --color-primary-default
'--color-primary-element-default-hover' => $this->util->mix($colorPrimaryElementDefault, $colorMainBackground, 60),