Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable28] fix(theming): Fix color inverted icons based on theming and dark mode #41920

Merged
merged 2 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions apps/files/src/views/Navigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,10 @@ export default {
background-position: center;
}

.app-navigation::v-deep .app-navigation-entry.active .button-vue.icon-collapse:not(:hover) {
color: var(--color-primary-element-text);
}

.app-navigation > ul.app-navigation__list {
// Use flex gap value for more elegant spacing
padding-bottom: var(--default-grid-baseline, 4px);
Expand Down
1 change: 1 addition & 0 deletions apps/theming/css/default.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions apps/theming/lib/Themes/CommonThemeTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ protected function generatePrimaryVariables(string $colorMainBackground, string
// 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,
Expand Down
2 changes: 1 addition & 1 deletion core/css/apps.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion core/css/apps.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions core/css/apps.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}

Expand Down Expand Up @@ -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);
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion core/css/server.css

Large diffs are not rendered by default.

Loading