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) {

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;
}
.use-note-color {
--custom-color: var(--dark-theme-custom-color);
}

View File

@ -91,4 +91,8 @@ html {
.ck-content a.reference-link > span,
.board-note {
color: var(--light-theme-custom-color, inherit);
}
.use-note-color {
--custom-color: var(--light-theme-custom-color);
}

View File

@ -308,4 +308,8 @@ body .todo-list input[type="checkbox"]:not(:checked):before {
--modal-background-color: hsl(var(--custom-color-hue), 8.8%, 11.2%);
--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%);
}
.use-note-color {
--custom-color: var(--dark-theme-custom-color);
}