Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
client/collections/board: extract column header colors as CSS variables, fix column header border
Adorian Doran8fda6a05663f
diff --git a/apps/client/src/stylesheets/theme-next-dark.css b/apps/client/src/stylesheets/theme-next-dark.cssindex b81a46d397..fb2f0c504f 100644--- a/apps/client/src/stylesheets/theme-next-dark.css+++ b/apps/client/src/stylesheets/theme-next-dark.css@@ -419,6 +419,10 @@--board-text-lightness: 80%;--board-muted-text-saturation: 18%;--board-muted-text-lightness: 73%;+ --board-column-header-text-saturation: 67%;+ --board-column-header-text-lightness: 81%;+ --board-column-header-muted-text-saturation: 18%;+ --board-column-header-muted-text-lightness: 73%;--board-focus-outline-saturation: 60%;--board-focus-outline-lightness: 70%;diff --git a/apps/client/src/stylesheets/theme-next-light.css b/apps/client/src/stylesheets/theme-next-light.cssindex caa9fa9430..0b5db7ad9e 100644--- a/apps/client/src/stylesheets/theme-next-light.css+++ b/apps/client/src/stylesheets/theme-next-light.css@@ -418,6 +418,10 @@--board-text-lightness: 8%;--board-muted-text-saturation: 20%;--board-muted-text-lightness: 40%;+ --board-column-header-text-saturation: 30%;+ --board-column-header-text-lightness: 8%;+ --board-column-header-muted-text-saturation: 20%;+ --board-column-header-muted-text-lightness: 40%;--board-focus-outline-saturation: 50%;--board-focus-outline-lightness: 34%;diff --git a/apps/client/src/widgets/collections/board/index.css b/apps/client/src/widgets/collections/board/index.cssindex 339d292b8b..fff3d72b29 100644--- a/apps/client/src/widgets/collections/board/index.css+++ b/apps/client/src/widgets/collections/board/index.css@@ -66,16 +66,23 @@than hiding what is behind it. */--board-edit-backdrop: rgba(0, 0, 0, 0.15);- /* What the board writes its text and icons in, and what it marks the quieter ones with. These- are what a plain board paints; on a coloured one the pair below replaces them. */+ /* What the board writes its text and icons in, and what it marks the quieter ones with. A+ column's heading has a pair of its own, standing as it does on the column rather than on a+ card. These are what a plain board paints; on a coloured one the pairs below replace them. */--board-text-color: var(--main-text-color);--board-muted-text-color: var(--muted-text-color);- /* How the two are composed where something around carries a hue. The colour lends its hue- alone: the lightness is the theme's, so a coloured board reads as light as a plain one. */+ --board-column-header-text-color: var(--main-text-color);+ --board-column-header-muted-text-color: var(--muted-text-color);+ /* How each is composed where something around carries a hue. The colour lends its hue alone:+ the lightness is the theme's, so a coloured board reads as light as a plain one. */--board-text-saturation: 30%;--board-text-lightness: 8%;--board-muted-text-saturation: 20%;--board-muted-text-lightness: 40%;+ --board-column-header-text-saturation: 30%;+ --board-column-header-text-lightness: 8%;+ --board-column-header-muted-text-saturation: 20%;+ --board-column-header-muted-text-lightness: 40%;--board-focus-outline-saturation: 55%;--board-focus-outline-lightness: 45%;@@ -248,7 +255,7 @@ body.mobile .board-view-container .board-add-column {}.board-view-container .board-column h3 {- color: var(--board-text-color);+ color: var(--board-column-header-text-color);font-size: 1em;margin: 0;padding: 0.5em 0.5em 0.5em 0.5em;@@ -303,7 +310,7 @@ body.mobile .board-view-container .board-add-column {.board-view-container .board-column h3 .counter-badge {flex-shrink: 0;/* The pill is the quiet colour turned inside out, so it follows the same one. */- background-color: var(--board-muted-text-color);+ background-color: var(--board-column-header-muted-text-color);color: var(--main-background-color);border-radius: 12px;padding: 0.1em 0.6em;@@ -338,7 +345,9 @@ body.mobile .board-view-container .board-add-column {.board-view-container .board-column h3:hover {background-color: var(--hover-item-background-color);- border-radius: 4px;+ /* The head alone: the foot is the line dividing the heading from the cards, and a corner+ radius bends its ends away from the column's own edges. */+ border-radius: 4px 4px 0 0;}/* Outlined from within rather than bordered: a border is a box of its own, and the heading would@@ -375,7 +384,7 @@ body.mobile .board-view-container .board-add-column {.board-view-container .board-column h3 > .column-sort {flex-shrink: 0;margin-inline-start: 0.25em;- color: var(--board-muted-text-color);+ color: var(--board-column-header-muted-text-color);}.board-view-container .board-column > .board-column-content {@@ -470,9 +479,20 @@ body.mobile .board-view-container .board-add-column {}/* The text, the icons and the outline of whatever is focused, each taking the hue of the nearest- thing that has one: the column for its header and buttons, the card for itself and what it- holds. */+ thing that has one: the column for its heading and for what stands in it, the card for itself+ and what it holds. */.board-view-container .board-column.with-hue {+ --board-column-header-text-color: hsl(+ var(--board-column-custom-hue),+ var(--board-column-header-text-saturation),+ var(--board-column-header-text-lightness)+ );+ --board-column-header-muted-text-color: hsl(+ var(--board-column-custom-hue),+ var(--board-column-header-muted-text-saturation),+ var(--board-column-header-muted-text-lightness)+ );+ /* Everything else the column holds takes its hue too, until a card carries one of its own. */--board-text-color: hsl(var(--board-column-custom-hue),var(--board-text-saturation),