Skip to content

Commit

Permalink
Update src/plugins/blocks/utils.js
Browse files Browse the repository at this point in the history
Co-authored-by: Raphael Wegmueller <github@rofe.com>
  • Loading branch information
dylandepass and rofe authored Dec 22, 2023
1 parent c4192c9 commit 53ede20
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/plugins/blocks/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,15 +117,15 @@ export function getPreferedBackgroundColor(blockName) {
}

export function getPreferedForegroundColor(blockName) {
const defaultBackgroundColor = '#ffffff';
const defaultForegroundColor = '#ffffff';
if (blockName === 'Section Metadata') {
return getComputedStyle(document.documentElement)
.getPropertyValue('--sk-section-metadata-table-foreground-color') || defaultBackgroundColor;
.getPropertyValue('--sk-section-metadata-table-foreground-color') || defaultForegroundColor;
}

if (blockName === 'Metadata') {
return getComputedStyle(document.documentElement)
.getPropertyValue('--sk-metadata-table-foreground-color') || defaultBackgroundColor;
.getPropertyValue('--sk-metadata-table-foreground-color') || defaultForegroundColor;
}

return getComputedStyle(document.documentElement)
Expand Down

0 comments on commit 53ede20

Please sign in to comment.