- From: L. David Baron <dbaron@dbaron.org>
- Date: Fri, 28 Mar 2008 14:27:35 -0700
- To: Andrew Fedoniouk <news@terrainformatica.com>
- Cc: www-style <www-style@w3.org>
On Wednesday 2008-02-20 12:56 -0800, Andrew Fedoniouk wrote:
> I think it makes sense to add another value to the list-style-type
> enumeration - "tree-line".
>
> So if you have defined something like this:
>
> ul > li
> {
> display: list-item;
> list-style-type: tree-line;
> |outline-color:powderblue;
> }
>
> then you will be able to define lists with tree lines.
> See two samples at the bottom of:
> |
> http://www.terrainformatica.com/htmlayout/images/tree-view-lines.png
So writing a spec for this is far from trivial. A spec, for only
the visual part (ignoring any behavioral aspects, which are likely
to be out of scope for CSS) is going to have to cover two main
areas:
* how to draw the tree lines/twisties. There are a bunch of
different cases:
Twisties for:
* tree nodes without children
* tree nodes with children, expanded
* tree nodes with children, collapsed
and then the lines, which need to connect a node to all of its
children that are tree nodes. We would need rules explaining how
to draw all of these things (this seems related to the
'appearance' property).
It's not clear to me whether rules for drawing would satisfy 90%
of authors or whether they'd satisfy 10% of authors. I suspect
if the trees looked sufficiently like operating system trees it
might satisfy a large enough percentage of authors to be worth
implementation in browsers. But it's not worth implementing
something that authors wouldn't use because it doesn't look the
way they want.
* how to determine what list items are connected with each other.
CSS currently has only a concept of list-item, and no concept of
list containment. For example, are list items in a child of a
list item a child list of that item? What about a grandchild?
Great-grandchild? Does it depend whether there are other
siblings? For example, how would you render list-style-type:
tree-item on markup like:
<ul>
<li>item</li>
<li>item
<h3>A section</h3>
<div>
<p>Some text.</p>
<ul>
<li>Is this item connected by tree lines to its
great-grandparent?</li>
...
The key question here is: is it possible to come up with rules
that work here for 90% or more of cases? Or will authors need
to use selectors to say how their lists work?
-David
--
L. David Baron http://dbaron.org/
Mozilla Corporation http://www.mozilla.com/
Received on Friday, 28 March 2008 21:28:20 UTC