ListTree is a stylesheet plugin - no actual code - to reshape common TW asterisk/bullet lists into list trees.
Apply the style list-tree by use of the standard WikiText @@ technique.
@@.list-tree
*your
*bullet
*list
@@<:-)After seeing what you manage to do with just css I think I need to study css more now.
--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+unsubscribe@googlegroups.com.
To post to this group, send email to tiddl...@googlegroups.com.
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/38406b9e-1371-48fa-9c2a-9ae7f9dace59%40googlegroups.com.
Do you know what would be even more awesome? Turn it into a plugin and add a toolbar button to create a list tree easily. Wow,that would be even more than awesome ...
Do you know what would be even more awesome? Turn it into a plugin and add a toolbar button to create a list tree easily. Wow,that would be even more than awesome ...
\rules only
/* Change line color and thickness here */
.list-tree {
--list-tree-color: silver;
--list-tree-thickness: 1px;
}
.list-tree, .list-tree ul, .list-tree li { position: relative; }
.list-tree li { list-style: none; }
.list-tree ul { padding: 0 0 0 2em; }
.list-tree li::before, .list-tree li::after {
content: "";
position: absolute;
left: -1em;
}
/* horizontal line */
.list-tree li::before {
border-bottom: var(--list-tree-thickness) solid var(--list-tree-color);
top: .6em;
width: 7px;
}
/* vertical line */
.list-tree ul li::after {
border-left: var(--list-tree-thickness) solid var(--list-tree-color);
height: 100%;
top: .1em;
}
.list-tree ul > li:last-child::after { height: .5em; }
/* top-level: Lines if multiple top elements. No lines if single top element. */
.list-tree > li:last-of-type:before { display:none; }
.list-tree > li:first-of-type:before { border-top:var(--list-tree-thickness) solid var(--list-tree-color); }
.list-tree > li:before {
border-left: var(--list-tree-thickness) solid var(--list-tree-color);
height: 100%;
}@PMario
Wohoo I am getting CSS variables to work after all! What I've missed before, that you brought attention to here, was the need for pragma rules.
Having encountered Mario and Jed IRL I know these are not fellas to mess with...
.. At this stage, even a minimal UI as bordering on overkill for such a small creation but I'm hoping to eventually add some more stuff to style e.g lists.