Skip to content

Commit

Permalink
Merge pull request #3117 from nextcloud/bugfix/css-colors-23.05
Browse files Browse the repository at this point in the history
  • Loading branch information
juliushaertl committed Aug 22, 2023
2 parents 6927e36 + bd9c78d commit 4f984e8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/helpers/coolParameters.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ const getCollaboraTheme = () => {
const generateCSSVarTokens = () => {
/* NC versus COOL */
const cssVarMap = {
'--color-primary-text': '--co-primary-text',
'--color-primary-text': '--co-primary-text:--nc-color-primary-element-text',
'--color-primary-element': '--co-primary-element:--co-text-accent',
'--color-primary-light': '--co-primary-light',
'--color-primary-element-light': '--co-primary-element-light',
Expand Down 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 4f984e8

Please sign in to comment.