How to resize text in custom viewtemplate tiddlers?

70 views
Skip to first unread message

David Gifford

unread,
Apr 27, 2020, 12:10:48 PM4/27/20
to TiddlyWiki
Hi all

What TW CSS rule controls the font-size of the text in custom tiddlers tagged viewtemplate? I would like the text in those tiddlers not to be smaller than the actual tiddler text. But I can't find it anywhere.

David Gifford

unread,
Apr 29, 2020, 8:43:57 AM4/29/20
to TiddlyWiki
I know this is only two days old, but it got only 16 views, and no answers. So I am bumping it back to the top of the thread list.

Mat

unread,
Apr 29, 2020, 8:56:35 AM4/29/20
to TiddlyWiki
What TW CSS rule controls the font-size of the text in custom tiddlers tagged viewtemplate? I would like the text in those tiddlers not to be smaller than the actual tiddler text. But I can't find it anywhere.

Interstingly, using the inspector tool, there seems to be no class or even div around this. So, what you can do in your custom viewtemplate is to add a class around the content, like so

<div class="myclass">
your content
</div>

Then make a stylesheet tiddler and resize the text for example like so

.myclass {font-size:110%;}

<:-)

David Gifford

unread,
Apr 29, 2020, 2:16:37 PM4/29/20
to TiddlyWiki
Thanks Mat! Here I was trying to figure out the proper workings of it, that I overlooked the obvious, a simple CSS workaround. Thank you!

But it IS strange that it is not clearer what changes the text size like this.

Joshua Fontany

unread,
Apr 29, 2020, 7:43:14 PM4/29/20
to TiddlyWiki
The CSS that set the tiddler-body font size is below. If you wrap your custom view template section in a div or a $reveal with class="tc-tiddler-body" it will get the same font size as the "body text".

.tc-tiddler-frame .tc-tiddler-body {
 font
-size: 15px;
 line
-height: 22px;
}


Best,
Joshua Fontany
Reply all
Reply to author
Forward
0 new messages