1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2026-04-29 02:01:29 +00:00

Include palette entry name in palette entries

Makes debugging easier, and works in CSS and as a style.prop assignment
This commit is contained in:
Jeremy Ruston
2025-03-07 16:21:51 +00:00
parent 30016967b1
commit ee977def52

View File

@@ -10,7 +10,7 @@ tags: $:/tags/Macro
<$list filter="[<consolidatedPalette>indexes[]sort[]]" variable="colour-name">
<$let filter-text={{{ [<consolidatedPalette>getindex<colour-name>] :else[[$:/config/DefaultColourMappings/]addsuffix<colour-name>get[text]] :map[tf.colour-inner-transform-classic-palette-entry<currentTiddler>] }}}>
<!-- Note the join, needed to cope with palette entries containing spaces -->
<$action-setfield $tiddler=<<outputPalette>> $index=<<colour-name>> $value={{{ [subfilter<filter-text>join[ ]] }}}/>
<$action-setfield $tiddler=<<outputPalette>> $index=<<colour-name>> $value={{{ [subfilter<filter-text>join[ ]] [<colour-name>addprefix[/* ]addsuffix[ */]] +[join[ ]] }}}/>
</$let>
</$list>
\end actions-compile-palette-filtered