How Switch Styles: Mimic TiddlyWiki Theme

In TiddlyWiki, themes contain a list of stylesheets. Activating a theme by clicking its name in $:/controlPanel -> Appearance -> Themes loads the styles associated with that theme and unloads the styles from the previously active theme.

My question is: If I have three groups of stylesheets, each grouped under a name like, how can I use them in TiddlyWiki as themes? Please keep the answer simple and efficient.

Trivial solutions:

  1. Switch the $:/tags/Stylesheet
  2. Use a dynamic stylesheet with a conditional filter
  3. Use a parent CSS selector

I belive a theme is like a plugin but only one is active at a time.

That’s true. Themes do really “unload” the “old” theme-plugin and install the new theme-plugin. So themes have “special” handling in the core code.

Usually themes can contain UI *Template tiddlers and optionally some style sheets.

The theme-switcher uses $:/snippets/themeswitcher and $:/snippets/minithemeswitcher tiddler. May be this gives you more context.