How to use font-family defined in the "Theme Tweaks" in your stylesheets

Theme Tweaks in Control Panel lets you define three types of font families

  1. $:/themes/tiddlywiki/vanilla/settings/fontfamily
  2. $:/themes/tiddlywiki/vanilla/settings/codefontfamily
  3. $:/themes/tiddlywiki/vanilla/settings/editorfontfamily

When creating a custom CSS class in my stylesheet, how do I tell it to use whatever font family is defined in “codefontfamily”?

We can pick colors from the palettes using color macro. Is there anything similar for the fonts?

1 Like
.myClass { font-family:{{$:/themes/tiddlywiki/vanilla/settings/codefontfamily}}; }

Notes:

  • To use transclusion in a stylesheet tiddler, leave the tiddler’s type field blank or set it to “TiddlyWiki 5” (text/vnd.tiddlywiki)

enjoy,
-e

1 Like

Argh! So simple! It just didn’t cross my mind. I thought I need some macro or widget for this :man_facepalming:t2: