A side question:

- what does the

href="javascript:;"

part mean?

On 21 ноя, 19:42, Yakov <[email protected]> wrote:
> I see. I suspected some sort of design flow.
>
> However, I didn't crearly understand the thing with the themes. Would
> the processing and cleanup be so bulky if, say, it would be demanded
> from the user to mark all the CSS-tiddlers with a tag "StyleSheet" or
> another?
>
> > Once you have gotten the styles the way you want, it is unlikely that the 
> > StyleSheet (and nested CSS tiddlers it references) will be changing much at 
> > all.
>
> Unfortunately, this seems not to apply to things I do.. I Experiment
> much with empasizing some semantics and also I'm planning to make
> hypertext lectures and study and show it's pros and cons, so styling
> is changed quite frequently.
>
> How diffuclt is it to write a plugin (or tweak?) which causes a
> "refresh" function to launch after saving a tiddler with a tag
> "StyleSheet"?
>
> Anyway, thanks for the solution, it works momently. I think I'll put
> it into the right sidebar.
>
> On 18 ноя, 20:58, Eric Shulman <[email protected]> wrote:
>
>
>
> > > make a tiddler A with CSS other than than StyleSheet (or core
> > > StyleSheets);
> > > include it into the StyelSheet, change CSS in A.
>
> > > What happens:
> > > CSS is not changed until I open the StyleSheet in editMode and close
> > > it. Or restart TW.
>
> > This is a 'design weakness' of the current stylesheet handling.
>
> > Because you can *nest* embedded CSS from other tiddlers, the
> > Stylesheet definition is recursively retrieved, replacing the embedded
> > [[TiddlerName]] references with their respective content.  Only after
> > all the content has been retrieved is the entire block handed to the
> > brower and applied to the current rendered content.
>
> > There is a TW core 'notification' mechanism that can automatically
> > trigger a function whenever a given tiddler is changed.  When
> > [[StyleSheet]] is changed, it (and all the embedded CSS) is re-
> > applied.
>
> > However, as you noted, if a nested tiddler is changed, the
> > notification for *StyleSheet* does not occur.  Of course, there is a
> > notification for the actual tiddler that was changed, but that tiddler
> > has not been 'registered' with the core, so no side-effect CSS
> > processing is triggered.
>
> > To make nested tiddlers re-apply as you want, it would be necessary,
> > during the recursive expansion of the CSS source, to collect the names
> > of the all the tiddlers whose content is being embedded, and then
> > register notifications for each of these tiddlers.
>
> > One issue is that this could lead to a great deal of overhead
> > processing if a lot of small CSS 'fragments' are used.  Another
> > potential problem is that, when switching themes, a lot of 'cleanup'
> > work would be needed to *reset* the notifications on the currently
> > used CSS tiddlers, before switching themes and then adding
> > notifications for all the CSS tiddlers used by the new theme.
>
> > Lastly, the lack of notifications for nested CSS tiddlers is, in
> > general, only a minor problem that occurs while you are adjusting your
> > CSS definitions.  Once you have gotten the styles the way you want, it
> > is unlikely that the StyleSheet (and nested CSS tiddlers it
> > references) will be changing much at all.
>
> > In any case, if you can live with a one-click *semi-manual* solution,
> > you can put this bit of HTML into your document:
>
> > <html><a href="javascript:;"
> > onclick="story.switchTheme(config.options.txtTheme)">refresh styles</
> > a></html>
>
> > It creates a 'command link' that, when clicked, forces the core to re-
> > process the currently loaded systemTheme, which re-applies the
> > StyleSheet (and, of course, any nested CSS it references).  While not
> > a totally automatic solution, it is just ONE click, and it does avoid
> > having to 'touch' (edit/done) the [[StyleSheet]] just to apply the CSS
> > changes made in another tiddler.
>
> > enjoy,
> > -e
> > Eric Shulman
> > TiddlyTools / ELS Design Studios

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/tiddlywiki?hl=en.

Reply via email to