mirror of
https://github.com/nextcloud/server.git
synced 2026-04-20 22:00:39 -04:00
fix(theming): Fix color inverted icons based on theming and dark mode
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
b213fc7c74
commit
9c0ba1bab9
7 changed files with 13 additions and 4 deletions
|
|
@ -68,6 +68,7 @@
|
|||
--background-invert-if-bright: invert(100%);
|
||||
--background-image-invert-if-bright: no;
|
||||
--primary-invert-if-bright: no;
|
||||
--primary-invert-if-dark: invert(100%);
|
||||
--color-primary: #00679e;
|
||||
--color-primary-default: #0082c9;
|
||||
--color-primary-text: #ffffff;
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ trait CommonThemeTrait {
|
|||
// 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%)',
|
||||
|
||||
'--color-primary' => $this->primaryColor,
|
||||
'--color-primary-default' => $this->defaultPrimaryColor,
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -237,6 +237,10 @@ kbd {
|
|||
> a {
|
||||
background-color: var(--color-primary-element);
|
||||
color: var(--color-primary-element-text);
|
||||
|
||||
&:first-child > img {
|
||||
filter: var(--primary-invert-if-dark);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -281,6 +285,9 @@ kbd {
|
|||
> a {
|
||||
border-radius: var(--border-radius-pill);
|
||||
background-color: var(--color-primary-element-light);
|
||||
&:first-child > img {
|
||||
filter: var(--primary-invert-if-dark);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue