miscellaneous css fixes / reorganization

This commit is contained in:
Michael Shamoon
2022-04-13 09:29:23 -07:00
parent b90e339d10
commit 05d3731dbe
4 changed files with 50 additions and 51 deletions

View File

@@ -137,19 +137,19 @@ export class SettingsService {
}
// remove these in case they were there
this.renderer.removeClass(this.document.body, 'text-bg-dark')
this.renderer.removeClass(this.document.body, 'text-bg-light')
this.renderer.removeClass(this.document.body, 'primary-dark')
this.renderer.removeClass(this.document.body, 'primary-light')
if (themeColor) {
const hsl = hexToHsl(themeColor)
const bgBrightnessEstimate = estimateBrightnessForColor(themeColor)
if (bgBrightnessEstimate == BRIGHTNESS.DARK) {
this.renderer.addClass(this.document.body, 'text-bg-dark')
this.renderer.removeClass(this.document.body, 'text-bg-light')
this.renderer.addClass(this.document.body, 'primary-dark')
this.renderer.removeClass(this.document.body, 'primary-light')
} else {
this.renderer.addClass(this.document.body, 'text-bg-light')
this.renderer.removeClass(this.document.body, 'text-bg-dark')
this.renderer.addClass(this.document.body, 'primary-light')
this.renderer.removeClass(this.document.body, 'primary-dark')
}
this.renderer.setStyle(
document.documentElement,