TW5: Global setting to limit height of a tiddler when viewing it?

127 views
Skip to first unread message

Chuck R.

unread,
Dec 20, 2019, 9:15:22 AM12/20/19
to TiddlyWiki
I see there is a button on a tiddler (shown in edit mode) to limit the height of the tiddler in edit mode. That's not what I want. I want to limit the max height of all tiddlers when viewing them and use a global variable to do so. Using CSS would be fine also but I don't know what class to override in my Stylesheet.

I could also put in every tiddler an <iframe height="300" width="100%">, but that's not a global, automatic solution.

I looked through TW5.1.21 help and the appearance settings and didn't find a global setting to limit the height of all tiddlers yet. Is there such a setting?

Thank you.

Eric Shulman

unread,
Dec 20, 2019, 9:29:24 AM12/20/19
to TiddlyWiki
On Friday, December 20, 2019 at 6:15:22 AM UTC-8, Chuck R. wrote:
I see there is a button on a tiddler (shown in edit mode) to limit the height of the tiddler in edit mode. That's not what I want. I want to limit the max height of all tiddlers when viewing them and use a global variable to do so. Using CSS would be fine also but I don't know what class to override in my Stylesheet.

Use this:
.tc-tiddler-body { max-height: 50vh; overflow-y:auto; }

You can, of course, adjust the max-height value to suit your specific needs.  You could also replace "max-height" with "height" which would force all tiddlers to be the same height, even if their content is shorter.

note: "vh" units refer to the current height of your browser window.
If you resize the window, the tiddler heights will adjust automatically.
If you use other kinds of CSS units (e.g., "em", "px", "in", "cm", etc.)
then the tiddlers heights will no longer be adaptive to the window height.

enjoy,
-e

Chuck R.

unread,
Jan 4, 2020, 1:03:15 PM1/4/20
to TiddlyWiki
That worked. Thanks!

Reply all
Reply to author
Forward
0 new messages