From 52a36c01ffdce668c1ea03312a2e5648afdd2479 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Thu, 23 Jul 2026 13:32:19 +0100 Subject: [PATCH] Fix customisations panel selection when the palette redirects its imports The panel is now chosen from the current palette's own customisations field before falling back to the consolidated palette, so AutoToggle keeps its panel after a palette has been chosen in it. Also mirrors the colour scheme inheritance hop in the palette preview, and removes two leftover DeltaPhi suffixes --- core/palettes/TwentyTwenties.tid | 4 ++-- core/ui/PaletteManager.tid | 3 ++- core/wiki/macros/CSS.tid | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/core/palettes/TwentyTwenties.tid b/core/palettes/TwentyTwenties.tid index 993f1ab97..33d8a12a5 100644 --- a/core/palettes/TwentyTwenties.tid +++ b/core/palettes/TwentyTwenties.tid @@ -117,7 +117,7 @@ sidebar-button-foreground: [tf.colour[sidebar-controls-foreground]] sidebar-controls-foreground-hover: [tf.interpolate-colours[base-ink],[base-background],[0.2]] sidebar-controls-foreground: [tf.interpolate-colours[base-ink],[base-background],[0.8]] sidebar-foreground-shadow: inherit -sidebar-foreground: =[tf.colour[base-ink]] =[tf.colour[base-paper]] =[tf.colour[base-background]] +[colour-best-contrast:DeltaPhi[]] +sidebar-foreground: =[tf.colour[base-ink]] =[tf.colour[base-paper]] =[tf.colour[base-background]] +[colour-best-contrast[]] sidebar-muted-foreground-hover: [tf.colour[sidebar-muted-foreground]colour-set-oklch:l[0.3]] sidebar-muted-foreground: [tf.interpolate-colours[foreground],[page-background],[0.6]] sidebar-tab-background-selected: [tf.colour[tab-background-selected]] @@ -128,7 +128,7 @@ sidebar-tab-divider: [tf.colour[tab-divider]] sidebar-tab-foreground-selected: [tf.colour[tab-foreground-selected]] sidebar-tab-foreground: [tf.colour[tab-foreground]] sidebar-tiddler-link-foreground-hover: [tf.colour[sidebar-tiddler-link-foreground]colour-set-oklch:l[0.5]] -sidebar-tiddler-link-foreground: =[tf.colour[base-primary]] =[tf.colour[base-secondary]] =[tf.colour[base-tertiary]] =[tf.colour[base-background]] +[colour-best-contrast:DeltaPhi[]] +sidebar-tiddler-link-foreground: =[tf.colour[base-primary]] =[tf.colour[base-secondary]] =[tf.colour[base-tertiary]] =[tf.colour[base-background]] +[colour-best-contrast[]] site-title-foreground: [tf.colour[tiddler-title-foreground]] stability-deprecated: #ff0000 stability-experimental: #c07c00 diff --git a/core/ui/PaletteManager.tid b/core/ui/PaletteManager.tid index acb698057..14d1564f2 100644 --- a/core/ui/PaletteManager.tid +++ b/core/ui/PaletteManager.tid @@ -18,7 +18,8 @@ title: $:/PaletteManager {{$:/snippets/palettetests}} <$let - paletteCustomisations={{{ [[$:/temp/palette-consolidated]get[customisations]] }}} + resolvedPalette={{{ [{$:/palette}is[tiddler]] [{$:/palette}is[shadow]] :else[[$:/palettes/Vanilla]] }}} + paletteCustomisations={{{ [get[customisations]] :else[[$:/temp/palette-consolidated]get[customisations]] }}} layerTitle={{{ [function[tf.palette-customisations-layer]] }}} > <%if [!match[]] %> diff --git a/core/wiki/macros/CSS.tid b/core/wiki/macros/CSS.tid index 32e882a81..3d3fe31bd 100644 --- a/core/wiki/macros/CSS.tid +++ b/core/wiki/macros/CSS.tid @@ -146,7 +146,7 @@ tags: $:/tags/Macro \end color <$let - color-scheme-filter={{{ [get[color-scheme]] :else[[light]] }}} + color-scheme-filter={{{ [get[color-scheme]] :else[get[palette-import]get[color-scheme]] :else[[light]] }}} scheme={{{ [subfilter:all] }}} > <$slot $name="ts-raw"/>