I am looking at adding tag-pills at the end of lines of text for colorful, visual, easy identification purposes. I am not talking about the pills of actual tags, just individual uses of the tag-pill macro.
Is there any way to add styling to individual tag-pills, something like this? (but this doesn’t work).
On tiddlywiki.com it talks about element-attributes, but of course the link to ‘examples’ is an empty link, so I don’t know how to set that up, if it even applies.
If this is not achievable currently, could you guys consider “style” as a parameter for this macro in the next update to TW? style=“color:#eaeaea;”` I simply want to treat these pills as tiddler-less, independent visual elements.
The tag-pill macro is very old and very complex. It has a lot of “forground / background” color handling, to keep a high contrast between foreground and background.
So my idea was to create a new macro, that only duplicates the shape, without the complexitiy.
Eg: A <<tag-pill test>> macro call creates the following HTML outptut.
Since the style is in the macro, I suppose this would mean I need to create a global macro tiddler for each color I want to use, tag-pillgreen, tag-pillblue, etc.
Mario, your json worked great! I made the template a system tiddler, adjusted the font-weight to normal, and it is exactly what I wanted. Thank you, Mario! And thank you, too, Scribs!
I just saw this now and glad you have a solution @DaveGifford. I will consider your requirement in a solution I have developed called “filter pills”. I think they would make sense in this case as you want tag pill behaviour that diverges from the core.
Update, my filter pill solution already handles a tag pill color but I will review the completness of my documentation within the package before sharing.
This is still in development, perhaps perpetualy filter-pills.json (20.0 KB)
After installing you would use the following to get your desired results.
Thanks again Tones. I finally got round to trying this out. Nice! I just needed a way to display text and adjust the color, with no dropdown information needed. So this was a little overkill for my problem. But this is a wonderful tool with lots of possibilities.