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

bugfix/css colors 23.05 #3117

Merged
merged 2 commits into from
Aug 22, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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