Remove space between ViewTemplate elements?

Hi all, I’m trying to add a tag-pill-style-button below $:/core/ui/ViewTemplate/tags on every tiddler in my wiki.

A simplified version of the button is as follows:

<$macrocall $name="tag-pill-body" tag=Example colour=Pink palette={{$:/palette}} element-tag="$button" />

Here is what it looks like on a tiddler with a tag:

Here is what it looks like on a tiddler without a tag:

Notice that the gap between the subtitle and the next element is greater in the second example? Does anyone know how I could remove this gap?

I recommend using your browser’s Inspect tool to see how css is being applied.

Looking quickly, it seems the vanilla stylesheet adds a top margin of 4px to the .tc-tags-wrapper and perhaps that’s still taking up space when the tags-wrapper is empty.

You could try assigning more bottom-margin to your subtitle element, and removing that 4px from the top margin of your tags-wrapper.

1 Like