Skip to content

Commit

Permalink
Merge pull request #3853 from nextcloud/backport/3840
Browse files Browse the repository at this point in the history
[stable29] Allow passing css var to change Collabora logo color
  • Loading branch information
elzody committed Jul 30, 2024
2 parents fa424d4 + e2cc7ca commit 7dc2be5
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 7dc2be5

Please sign in to comment.