Skip to content

Commit

Permalink
fix: Proper invert colors for dark mode
Browse files Browse the repository at this point in the history
Signed-off-by: Julius Härtl <[email protected]>
  • Loading branch information
juliushaertl committed Aug 16, 2023
1 parent 9d820b9 commit bd9c78d
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/helpers/coolParameters.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ const generateCSSVarTokens = () => {
// Skip extracting css vars if we cannot access parent
}

const primaryText = window.getComputedStyle(element).getPropertyValue('--color-primary-text')
if (primaryText.trim() === '#ffffff') {
str += '--nc-dark-primary-invert-if-dark=invert(100%);--nc-dark-primary-invert-if-bright=none;'
}

const customLogo = loadState('richdocuments', 'theming-customLogo', false)
if (customLogo) {
str += ';--nc-custom-logo=' + window.OCA?.Theming?.cacheBuster ?? 0 + ';'
Expand Down

0 comments on commit bd9c78d

Please sign in to comment.