Trouble with a plugin stylesheet... (shadowed styesheet doesn't work untill renamed)

61 views
Skip to first unread message

Måns

unread,
May 9, 2015, 7:42:15 AM5/9/15
to tiddl...@googlegroups.com
Hi TwWizards

I'm trying to make a stylesheet load with a plugin I've made. 
It doesn't work untill I rename it and is no longer a shadow tiddler...

I tried to rename it in different ways and repackaged the plugin - it doesn't help.
To me it seems that it is the status of it being a shadow tiddler when loaded with the plugin which stops it from working...

I had it working when I first made the plugin - 
I had made a typo when naming the plugin in the first place. 
I used semi colon instead of colon (due to bad eyesight I guess...) for the title of the plugin: $;/plugins/måns .... instead of $:/plugins/måns ...
All other plugin tiddlers were titled with a colon - including the stylesheet tiddler..
Back then the stylesheet worked fine as a shadow tiddler..

Now that I renamed the plugin and it uses a colon in the title - the shadowed stylesheet tiddler doesn't work - unless I rename it and it is no longer a shadow tiddler.(It's not enough just to edit the tiddler - you'll have to change the title...)
 

Delete the renamed shadowed stylesheet tiddler - and you'll see that when it falls back to using the shadowed version - it doesn't work anymore...

Is there a naming convention that I haven't followed - or is my stylesheet approach wrong in the first place?

Cheers Måns Mårtensson

Andreas Hahn

unread,
May 10, 2015, 8:25:51 AM5/10/15
to tiddl...@googlegroups.com
Hi Mans,

the reason for that is that when packaged as a plugin, it is no longer
guaranteed that the stylesheet shadow tiddler is loaded AFTER the
vanilla base theme.
Therefore you have to get your stylesheet to load later or take a higher
precedence (i.e. change the styles to me more specific) for them to work.
Pretty much the only option I know of that does not require you to
change your stylesheets is to add a "list-after" field to your
stylesheet tiddler containing "$:/themes/tiddlywiki/vanilla/base" (or
the theme you are building upon). This ensures that your stylesheets are
loaded later.

There might be other ways to do it, that is however the option I have
found myself using in the past.

/Andreas

Måns

unread,
May 10, 2015, 9:04:39 AM5/10/15
to tiddl...@googlegroups.com
Aha. That makes sense.

Thank you very much for the explanation Andreas!

I enjoy your Tinka plugin packager/manager very much :-)

Is there any chance you will share your left menu tiddler editor some time soon?

Saw your demonstration at the hangout and it seems to be a great design for a quick editor and something that would be really fun/interesting to "dig into" for both @Jed, @Mat and myself considering what we are experimenting with at the moment... 

Cheers Måns Mårtensson

Greg Davis

unread,
May 10, 2015, 8:58:55 PM5/10/15
to tiddl...@googlegroups.com

@Andreas Great! that solved the mystery of trying to make my left menu into a plugin.

Been using Tinka as tried changing different things trying to get menu to work correctly, after making plugin. Now added 'list-after' to the tiddler I suspected to be
causing the problem and now it works. My first working plugin!

Thanks,
Greg

Reply all
Reply to author
Forward
0 new messages