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

@@ -35,10 +35,15 @@
.sidebar .nav-link {
font-weight: 500;
&:hover, &.active {
&:hover, &.active, &:focus {
color: var(--bs-primary);
}
&:focus-visible {
outline: none;
background-color: var(--bs-body-bg);
}
&.active {
font-weight: bold;
}

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,