Skip to content

Commit

Permalink
Fix #4755 - Indirect colours not shown in palette switcher (#4757)
Browse files Browse the repository at this point in the history
* Fix #4755 - Indirect colours not shown in palette switcher

* Update currpalettepreview.tid

* Update currpalettepreview.tid
  • Loading branch information
BurningTreeC committed Jul 15, 2020
1 parent 00ff0d6 commit 484c9e9
Showing 1 changed file with 32 additions and 3 deletions.
35 changes: 32 additions & 3 deletions core/wiki/currpalettepreview.tid
@@ -1,11 +1,40 @@
title: $:/snippets/currpalettepreview

\define resolve-colour(macrocall)
\import $:/core/macros/utils
\whitespace trim
<$wikify name="name" text="""$macrocall$""">
<<name>>
</$wikify>
\end
\define swatchStyle()
background-color: $(swatchColour)$;
\end
\define swatch-inner()
<$set name="swatchColour" value={{##$(colourResolved)$}}>
<$list filter="[<swatchColour>!prefix[<<colour ]!suffix[>>]]" variable="ignore">
<div class="tc-swatch" style=<<swatchStyle>> title=<<swatchTitle>>/>
</$list>
<$list filter="[<swatchColour>prefix[<<colour ]suffix[>>]]" variable="ignore">
<$wikify name="colourResolved" text="""<$macrocall $name="resolve-colour" macrocall=<<swatchColour>>/>""">
<<swatch-inner>>
</$wikify>
</$list>
</$set>
\end
\define swatch()
<$set name="swatchColour" value={{##$(colour)$}}
><div class="tc-swatch" style=<<swatchStyle>> title=<<colour>>/></$set>
<$set name="swatchColour" value={{##$(colour)$}}>
<$set name="swatchTitle" value=<<colour>>>
<$list filter="[<swatchColour>!prefix[<<colour ]!suffix[>>]]" variable="ignore">
<div class="tc-swatch" style=<<swatchStyle>> title=<<swatchTitle>>/>
</$list>
<$list filter="[<swatchColour>prefix[<<colour ]suffix[>>]]" variable="ignore">
<$wikify name="colourResolved" text="""<$macrocall $name="resolve-colour" macrocall=<<swatchColour>>/>""">
<<swatch-inner>>
</$wikify>
</$list>
</$set>
</$set>
\end
<div class="tc-swatches-horiz"><$list filter="
foreground
Expand All @@ -15,4 +44,4 @@ primary
page-background
tab-background
tiddler-info-background
" variable="colour"><<swatch>></$list></div>
" variable="colour"><<swatch>></$list></div>

0 comments on commit 484c9e9

Please sign in to comment.