Grabbing a colour palette colour value for custom elements

18 views
Skip to first unread message

Charlie Veniot

unread,
Oct 6, 2023, 11:02:58 PM10/6/23
to TiddlyWiki
(If viewing this from Google Groups, ignore the triple backticks.)

This is one approach to applying a particular colour setting from colour palettes to a custom element, to make sure that element fits any selected palette:

```
<$let couleur={{{ [[$:/palette]get[text]getindex[sidebar-tiddler-link-foreground]] }}}>
<style>
.couleur {color:<<couleur>>;text-decoration:underline;text-decoration-color:<<couleur>>}
</style>
<$button message="tm-modal" param={{!!title}} class="tc-btn-invisible couleur" >{{!!title}}</$button>
</$let>
```
Reply all
Reply to author
Forward
0 new messages