mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
enh(theming): Error contrast
Signed-off-by: Christopher Ng <chrng8@gmail.com>
This commit is contained in:
parent
fd7d0e2fd2
commit
27ebaea10c
3 changed files with 15 additions and 4 deletions
|
|
@ -20,6 +20,7 @@
|
|||
--color-error: #e9322d;
|
||||
--color-error-rgb: 233,50,45;
|
||||
--color-error-hover: #ed5a56;
|
||||
--color-error-text: #e7201b;
|
||||
--color-warning: #eca700;
|
||||
--color-warning-rgb: 236,167,0;
|
||||
--color-warning-hover: #efb832;
|
||||
|
|
|
|||
|
|
@ -59,6 +59,8 @@ class DarkTheme extends DefaultTheme implements ITheme {
|
|||
$colorBoxShadow = $this->util->darken($colorMainBackground, 70);
|
||||
$colorBoxShadowRGB = join(',', $this->util->hexToRGB($colorBoxShadow));
|
||||
|
||||
$colorError = '#e9322d';
|
||||
|
||||
return array_merge(
|
||||
$defaultVariables,
|
||||
$this->generatePrimaryVariables($colorMainBackground, $colorMainText),
|
||||
|
|
@ -82,6 +84,11 @@ class DarkTheme extends DefaultTheme implements ITheme {
|
|||
'--color-text-light' => $this->util->darken($colorMainText, 10),
|
||||
'--color-text-lighter' => $this->util->darken($colorMainText, 20),
|
||||
|
||||
'--color-error' => $colorError,
|
||||
'--color-error-rgb' => join(',', $this->util->hexToRGB($colorError)),
|
||||
'--color-error-hover' => $this->util->mix($colorError, $colorMainBackground, 60),
|
||||
'--color-error-text' => $this->util->lighten($colorError, 3),
|
||||
|
||||
// used for the icon loading animation
|
||||
'--color-loading-light' => '#777',
|
||||
'--color-loading-dark' => '#CCC',
|
||||
|
|
|
|||
|
|
@ -109,6 +109,8 @@ class DefaultTheme implements ITheme {
|
|||
$colorBoxShadow = $this->util->darken($colorMainBackground, 70);
|
||||
$colorBoxShadowRGB = join(',', $this->util->hexToRGB($colorBoxShadow));
|
||||
|
||||
$colorError = '#e9322d';
|
||||
|
||||
$variables = [
|
||||
'--color-main-background' => $colorMainBackground,
|
||||
'--color-main-background-rgb' => $colorMainBackgroundRGB,
|
||||
|
|
@ -137,10 +139,11 @@ class DefaultTheme implements ITheme {
|
|||
|
||||
'--color-scrollbar' => 'rgba(' . $colorMainTextRgb . ', .15)',
|
||||
|
||||
// info/warning/success feedback colours
|
||||
'--color-error' => '#e9322d',
|
||||
'--color-error-rgb' => join(',', $this->util->hexToRGB('#e9322d')),
|
||||
'--color-error-hover' => $this->util->mix('#e9322d', $colorMainBackground, 60),
|
||||
// error/warning/success/info feedback colours
|
||||
'--color-error' => $colorError,
|
||||
'--color-error-rgb' => join(',', $this->util->hexToRGB($colorError)),
|
||||
'--color-error-hover' => $this->util->mix($colorError, $colorMainBackground, 60),
|
||||
'--color-error-text' => $this->util->darken($colorError, 4),
|
||||
'--color-warning' => '#eca700',
|
||||
'--color-warning-rgb' => join(',', $this->util->hexToRGB('#eca700')),
|
||||
'--color-warning-hover' => $this->util->mix('#eca700', $colorMainBackground, 60),
|
||||
|
|
|
|||
Loading…
Reference in a new issue