Styles not working if the procedure tiddler is not in the storylsit

I am using a contextual-backlinks procedure in my wiki based on this discussion. Here highlighting of the backlink text is working only if the tiddler containing the procedure code is present in the sotrylist.
I have kept the tiddler containing the procedure code and a demo tiddler in the home page of the demo wiki for easy access. Can someone tell why is it happening so ? Here is the demo - Try closing the procedure tiddler and see this issue happening

Edit: You have to hover over the right and left margins of the tiddlers to see the buttons

You’ve included the necessary CSS (between the <style></style> tags) in the same tiddler as the procedures, so it applies only when that tiddler is rendered into the storylist. To make the styles universal, move them (without the <style></style> tags) into a tiddler with the tag $:/tags/Stylesheet.

As a side note, you’ve clearly done a lot of customization to get your wiki looking the way you like it -which is great, but harder for others to navigate. It actually took me longer to get the tiddler into edit mode than it did to find the problem! In cases like this where the wiki styling is relevant to the issue, I’d recommend putting any tiddlers whose code we might need to inspect in edit mode before you save the wiki, so they’ll be readily available. Alternatively, you can add the field code-body: yes to any tiddler to display its text as a codeblock when in view mode.

1 Like

I am sorry for the trouble. I had to include the customisations also because the backlink template was part of the a viewtempate cascade of these custom UI. Thats why I added the screenshot of how to edit the tiddler in my wiki.

This could have been done, but this idea didn’t crossed my mind while creating this post. Sorry for the extra work you had do and thanks for the suggestion which resolved my issue.

1 Like