title: $:/core/macros/tag tags: $:/tags/Macro \define tag-pill-styles() background-color:$(backgroundColor)$; fill:$(foregroundColor)$; color:$(foregroundColor)$; \end \define tag-pill-inner(tag,icon,colour,fallbackTarget,colourA,colourB,element-tag,element-attributes,actions) \whitespace trim <$let foregroundColor=<> backgroundColor=<<__colour__>> > <$element-tag$ $element-attributes$ class="tc-tag-label tc-btn-invisible" style=<> > <<__actions__>> <$transclude tiddler=<<__icon__>>/> is[missing]then[tc-tag-missing]else[tc-tag-exists]] }}}> <$view tiddler=<<__tag__>> field="title" format="text" /> \end \define tag-pill-body(tag,icon,colour,palette,element-tag,element-attributes,actions) \whitespace trim <$macrocall $name="tag-pill-inner" tag=<<__tag__>> icon=<<__icon__>> colour=<<__colour__>> fallbackTarget={{$palette$##tag-background}} colourA={{$palette$##foreground}} colourB={{$palette$##background}} element-tag=<<__element-tag__>> element-attributes=<<__element-attributes__>> actions=<<__actions__>> /> \end \define tag-pill(tag,element-tag:"span",element-attributes:"",actions:"") \whitespace trim >> <$let currentTiddler=<<__tag__>>> <$macrocall $name="tag-pill-body" tag=<<__tag__>> icon={{{ [] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerIconFilter]!is[draft]get[text]] }}} colour={{{ [] :cascade[all[shadows+tiddlers]tag[$:/tags/TiddlerColourFilter]!is[draft]get[text]] }}} palette={{$:/palette}} element-tag=<<__element-tag__>> element-attributes=<<__element-attributes__>> actions=<<__actions__>>/> \end \define tag(tag) {{$tag$||$:/core/ui/TagTemplate}} \end