> hi all, i was wondering if there was a way to include tiddlers
> with extra style rules in my main Stylesheet tiddler.
yes. Just use the [[TiddlerName]] syntax within the body of your
[[StyleSheet]].
When you *view* the stylesheet, this will appear as a simple
TiddlyLink... but, when the stylesheet is *used* by TW, the referenced
tiddler's content is automatically inserted into the stylesheet, and
then the *combined* content is passed on to the browser for use in
rendering.
> it would be nice to be able to divide it into several parts
> (tw's defualt stylesheets are divided into colors, layout,
> etc). i would like to divide my styles up too-- then if i
> wanted to export a certain set of styles to another wiki,
> i could just import a single tiddler containg that set. but
> i need a way to include it in the regular Stylesheet tiddler.
Precisely the intended purpose... allowing "mix-and-match" styles to
be used in a variety of "themes". For example:
http://www.TiddlyTools.com/#StyleSheetShortcuts
is a collection of convenient CSS 'shortcuts' for quickly applying
various text styles, alignments, sizes, colors, etc.
This syntax can also be used to quickly switch themes, even without a
separate plugin: instead of putting custom CSS definitions directly
into [[StyleSheet]], put the CSS for each theme into a separate
tiddler and just include the desired theme in the StyleSheet.
Switching themes is as easy as changing the [[TiddlerName]] referenced
in StyleSheet to a different title. Examples on TiddlyTools:
http://www.TiddlyTools.com/#Plain
http://www.TiddlyTools.com/#Blackout
http://www.TiddlyTools.com/#Textures
http://www.TiddlyTools.com/#Woodshop
http://www.TiddlyTools.com/#[[Edge%20of%20Night]]
http://www.TiddlyTools.com/#[[Let's%20Get%20Tanked!]]
Also, if you DO want to switch themes 'on-the-fly', you can use this
plugin:
http://www.TiddlyTools.com/#SelectStylesheetPlugin
which presents a listbox/droplist control containing the various
themes (tagged with "stylesheet"). Select a theme and it is
automatically applied. Note: this does NOT change the default
[[StyleSheet]] tiddler contents. The selected stylesheet is tracked
by a cookie (txtStyleSheet), and is re-applied each time you reload
your document (unless you clear the cookies, of course!)
You can try this plugin live on TiddlyTools: simply go to
http://www.TiddlyTools.com
and then, in the default [[Welcome]] tiddler, select the "themes"
tab. In the upper right corner of that tab is a drop list of themes
to choose from...
enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios