Nested definition lists

48 views
Skip to first unread message

Len

unread,
Nov 26, 2008, 11:24:01 AM11/26/08
to TiddlyWikiDev
I think there's a css problem with nested definition lists

;1 dt
:;1.1 dt
::1.1 dd
:;1.2 dt
::;1.2.1 dt
:::1.2.1 dd
;2 dt
:;2.1 dt
::2.1 dd

Rendering inside tiddlers is a bit weird : every child definition
terms and descriptions (dt and dd) are rendered like a definition term
(bold) and every children list are rendered at the same level as the
previous element.

As far as I can tell the problem is in the css (or the way the list is
built html wise). As every new list is contained inside the parent dt
everything will inherit its css properties.

The only workaround I've found so far would be to always add an empty
dd before creating a new child definition list (see below).

;1 dt
:
:;1.1 dt
::1.1 dd
:;1.2 dt
::
::;1.2.1 dt
:::1.2.1 dd
;2 dt
:
:;2.1 dt
::2.1 dd

I know it's a very specific use but it could maybe use some code
tweaks somewhere

FND

unread,
Nov 27, 2008, 1:18:13 PM11/27/08
to Tiddly...@googlegroups.com
> I think there's a css problem with nested definition lists

It seems more like a parsing issue to me; the generated HTML is missing
a DD wrapper.
However, I'm not sure whether they should be supported; nesting DLs
doesn't really make sense semantically, does it?

> The only workaround I've found so far would be to always add an empty
> dd before creating a new child definition list

You might also try using a class wrapper:
;1 dt
:1{{multiline{
;1.1 dt
:1.1 dd
}}}

This technique is described on the community wiki:
http://www.tiddlywiki.org/wiki/Multi-Line_Contents
(currently down, so try Google's cache: http://tinyurl.com/6c9o5f /
http://66.102.9.132/search?hl=en&q=cache%3Ahttp%3A//www.tiddlywiki.org/wiki/Multi-Line_Contents)


-- F.

Reply all
Reply to author
Forward
0 new messages