style/note colors: use a more elegant way to retrieve the theme-aware note color

This commit is contained in:
Adorian Doran 2025-11-30 19:46:15 +02:00
parent 288595ce5d
commit 66f2d0c7dc
4 changed files with 12 additions and 1 deletions

View File

@ -44,7 +44,7 @@ function createClassForColor(colorString: string | null) {
} }
} }
return clsx(className, colorsWithHue.has(className) && "with-hue"); return clsx("use-note-color", className, colorsWithHue.has(className) && "with-hue");
} }
function parseColor(color: string) { function parseColor(color: string) {

View File

@ -109,3 +109,6 @@ body .todo-list input[type="checkbox"]:not(:checked):before {
box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6) !important; box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.6) !important;
} }
.use-note-color {
--custom-color: var(--dark-theme-custom-color);
}

View File

@ -92,3 +92,7 @@ html {
.board-note { .board-note {
color: var(--light-theme-custom-color, inherit); color: var(--light-theme-custom-color, inherit);
} }
.use-note-color {
--custom-color: var(--light-theme-custom-color);
}

View File

@ -309,3 +309,7 @@ body .todo-list input[type="checkbox"]:not(:checked):before {
--modal-border-color: hsl(var(--custom-color-hue), 9.4%, 25.1%); --modal-border-color: hsl(var(--custom-color-hue), 9.4%, 25.1%);
--promoted-attribute-card-background-color: hsl(var(--custom-color-hue), 13.2%, 20.8%); --promoted-attribute-card-background-color: hsl(var(--custom-color-hue), 13.2%, 20.8%);
} }
.use-note-color {
--custom-color: var(--dark-theme-custom-color);
}