Re: Tree presented lists (was: Suggestion)

At 10:20 -0700 7/20/01, Tantek Celik wrote:

>I think list-style-type could be a good way to achieve this kind of
>stylistic effect, but the name of the value "tree" sounds a bit too general,
>as one can think of numerous "tree-like" ways of displaying lists.
>
>perhaps something like
>    list-style-type: outline;
>or
>    list-style-type: tree-outline;
>or
>    something else?
>
>Another question - can items in such lists be numbered, e.g. using your
>example:
>
>   *-+--- 1. first
>     |--- 2. second
>     |-+- 3. third
>     | |--- a. first nested
>     | |--- b. second nested
>     | +--- c. third nested
>     +--- 4. forth (resumed)
>
>If so, then you need another mechanism besides list-style-type, because
>list-style-type would be currently used for the numbering, e.g. to get your
>markup to display the numbering as shown above, use this style sheet:
>
>   .example { list-style-type:decimal }
>   .example .example { list-style-type:lower-alpha }

   I think this is why 'list-style-type' isn't appropriate for hanging 
these kinds of values, unless we feel like changing the value syntax 
such that we could say:

   .example { list-style-type: tree decimal;}
   .example .example { list-style-type: lower-alpha tree;}

...or whatever values we chose to add.  That seems clumsy, though.
    Given this, we ought to also consider adding a property to control 
list presentation.  We could call it, oh, I don't know, how about 
'list-presentation'?  It would let us open a path for future 
expansion of presentational schemes beyond trees (e.g., leader dots), 
and not put us in danger of colliding with legacy implementations' 
handling of any change to the value syntax of 'list-style-type' or 
'list-style'.  (Then again, I'm getting tired of having to dance 
around bad legacy implementations every time we want to do something 
interesting.  Value constraints pretty much died when they smacked 
into that same wall.)
    Adding 'list-presentation' would also let us fold it into the 
shorthand 'list-style' so that authors could say:

    .example {list-style: inside tree disc url(arrow.png);}

We should think about this carefully, though, since another potential 
value for 'list-presentation' is 'collapse', as in "collapsing 
tree-view."  That might be a bit too much like a behavior, but then 
the same could be said of blinking and hover effects.

--
Eric A. Meyer (eric@meyerweb.com)  http://www.meyerweb.com/eric/
Editor, Style Sheets Ref. Guide    http://style.webreview.com/
Author, "Cascading Style Sheets: The Definitive Guide" and
  "CSS 2.0 Programmer's Reference"  http://www.meyerweb.com/eric/books/

Received on Friday, 20 July 2001 13:46:43 UTC