Skip to content

Commit

Permalink
Merge pull request #3854 from nextcloud/backport/3840-stable28
Browse files Browse the repository at this point in the history
[stable28] Allow passing css var to change Collabora logo color
  • Loading branch information
elzody authored Jul 30, 2024
2 parents c7c835f + a8806ad commit da3c81b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/helpers/coolParameters.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,15 @@ const generateCSSVarTokens = () => {
if (customLogo) {
str += ';--nc-custom-logo=' + window.OCA?.Theming?.cacheBuster ?? 0 + ';'
}

const rootEl = document.querySelector(':root')

const logoBgColor = window.getComputedStyle(rootEl).getPropertyValue('--nc-logo-background')
str += '--nc-logo-background=' + (logoBgColor === '' ? 'transparent' : logoBgColor) + ';'

const logoDisplay = window.getComputedStyle(rootEl).getPropertyValue('--nc-logo-display')
str += '--nc-logo-display=' + (logoDisplay === '' ? 'block' : logoDisplay) + ';'

return str.replace(/["']/g, '\\\'')
}

Expand Down

0 comments on commit da3c81b

Please sign in to comment.