00345: styling sublevels of numbered lists

Summary: styling sublevels of numbered lists
Created: 2005-02-25 01:47
Status: Closed

Reason: Can be achieved through CSS

Category: Feature,
From: Klonk
Assigned:
Priority: 1
Version: 2.0beta22
OS:

Description: I'm searching for a possibility to have an additional style (best would be automatic) when another sublevel of the list occurs.

Here an example what I mean:

 *Item1
 *Item2
 **Item2.1
 ***Item2.1.1
 **Item2.2
 *Item3

Above Item2 and Item2.1 should have a different (better: additional) style to indicate that a sublevel is following.

Can you tell me how to achieve this? It doesn't have to be integrated into the normal distribution.

Reason: I want to use this for my Cookbook:HorizontalVerticalMenu script for adding an image or something to indicate that an additional submenu is available. And I don't want to rewrite the "Block" function.


Ummm, why not just use CSS?

  .wikitext ul { /* styles for first-level unordered lists */ }
  .wikitext ul ul { /* styles for second-level lists */ }
  .wikitext ul ul ul { /* styles for third-level lists */ }

See Cookbook:OutlineLists for an example of how this has been used to produce ordered lists that use an outline numbering scheme.

--Pm


Well, I already use CSS heavily, maybe a better example:

 *Item1
 *Item2
 **Item2.1
 **Item2.2
 ***Item2.2.1
 *Item3

In this case the "Item2.2" should have a small plus as graphics (could easily be done with CSS), but "Item2.1" should not have ths plus. Only that entry in the list that is the "father" of some subitems shoud have a plus. The other shouldn't have it. Therefore the "fathers" should get a different style and I just don't know how to check in the markup whether a child (listitem) is following or not.

I hope this makes it clearer. Thanks for helping. Klonk

See also Cookbook:WikiStylesPlus