Is it possible to list two Table-of-Contents macros without a gap in between them?

71 views
Skip to first unread message

si

unread,
Apr 4, 2020, 10:33:00 AM4/4/20
to tiddl...@googlegroups.com
Listing two toc macros like this:

<div class="tc-table-of-contents">
<
<toc-selective-expandable "contents-dino">>
<
<toc-selective-expandable "contents-shark">>
</div>

Gives this result:

1.png


Is there any way to make it look like this:

2.png


(whilst still using two separate toc macros)


Thanks in advance, Si.

Mark S.

unread,
Apr 4, 2020, 1:43:15 PM4/4/20
to TiddlyWiki
You can make a stylesheet tiddler (a tiddler tagged $:/tags/Stylesheet) like:

div.tc-tiddler-body.tc-reveal  div.tc-table-of-contents ol.tc-toc.toc-selective-expandable {
margin
-top: 0 ;
margin
-bottom: 0;
}

You might want to add something to the selector so it only applies to certain tagged tiddlers.

Mat

unread,
Apr 4, 2020, 2:34:54 PM4/4/20
to TiddlyWiki
Since you add a class around it, I'd add a custom class like so:

<div class="tc-table-of-contents mystyle">

<
<toc-selective-expandable "contents-dino">>
<
<toc-selective-expandable "contents-shark">>
</div>

And then either a stylesheet as Mark suggests or if it is a one off, it might be enough with a styleblock in the same tiddler:

<style>
.mystyle ol {
  margin
-top: 0;
  margin
-bottom: 0;
}
</style>

<:-)

si

unread,
Apr 4, 2020, 3:49:25 PM4/4/20
to TiddlyWiki
Perfect! Thanks a lot to you both
Reply all
Reply to author
Forward
0 new messages