Re: Styling by attribute-based association?

Andrew Fedoniouk wrote:
> Matthew, apply :
> <style>
>    li > nl > li { display:none }
>    li > nl > li > label { display:block }
>    li[open] > nl > li { display:block }
> 
>    li > nl { backround-image: plus.png; background-repeat: no-repeat; 
> background-position: 3px 3px;}
>    li[open] > nl { backround-image: minus.png }
> </style>
> 
> To the following:
> 
> <nl>
>     <label>Contents </label>
>     <li href="#introduction">Introduction</li>
>     <li>
>        <nl>
>            <label>Terms</label>
>            <li href="#may">May</li>
>            <li href="#must">Must</li>
>            <li href="#should">Should</li>
>        </nl>
>     </li>
>     <li href="#conformance">Conformance</li>
>     <li href="#references">References</li>
>     ...
> </nl>
> 
> and you will get something close to collapsible trees.

   What does this have to do with menus or the problems with having
label as a child element that I mentioned in my previous message? (Also,
note that there is no |open| attribute in the current draft of XHTML2.)

> In fact[,] collapsible tree behavior (TreeView) needs something more - ability
> to navigate through items by arrow keys - like in select[.]
> [This] is why I've choosen <select> as a base for implementation
> of collapsible trees. In fact[,] I have only one [behavior,] "select"[,] which
> covers all <select> cases - collapsible and plain.

   Web Forms 2.0 allows for nested <optgroup> elements, so for a
<select> element with the attribute |multiple|, a compliant user agent
may use a treeview-style widget anyways. I'm not really sure what you're
getting at...

Received on Thursday, 27 October 2005 20:01:36 UTC