I’m playing around with palettes and I noticed that the swatches remain
blank when the respective palette entry doesn’t contain a hex code but
another call of <<colour>>.
Since I am using a system adapted from the Solar Flare palette which works
with base colours, I use hex codes only for custom colour styles and
reference them with calls (like for example <<colour tz-base1-dark>>) for
all existing TW styles in the palette editor. I.e. none of the swatch
‘types’ have a hex code entry and all swatch fields are white which makes
the palette preview useless.
For reference, this is $:/snippets/currpalettepreview where the swatches
are defined. Can value={{##$colour$}} be changed to do what I want, i.e.
resolve the call of <<colour>>?
\define swatchStyle()
background-color: $(swatchColour)$;
\end
\define swatch(colour)
<$set name="swatchColour" value={{##$colour$}}>
<div class="tc-swatch" style=<<swatchStyle>>/>
</$set>
\end
<div class="tc-swatches-horiz">
<<swatch foreground>>
<<swatch background>>
<<swatch muted-foreground>>
<<swatch primary>>
<<swatch page-background>>
<<swatch tab-background>>
<<swatch tiddler-info-background>>
</div>
Thanks! Tyll
--
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit
https://groups.google.com/d/msgid/tiddlywiki/04e8ec05-bd9d-4738-95a1-266f8f290583%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.