Re: Styling by attribute-based association?

----- Original Message ----- 
From: "Matthew Raymond" <mattraymond@earthlink.net>
To: "Andrew Fedoniouk" <news@terrainformatica.com>
Cc: "Mark Birbeck" <mark.birbeck@x-port.net>; "'W3C CSS'" <www-style@w3.org>
Sent: Thursday, October 27, 2005 1:01 PM
Subject: 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.)

I don't understand your problem with nl's.
Write it as:

Contents:
<nl>
   <li href="#introduction">Introduction</li>
   <li>Terms
      <nl>
          <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 have labels out of NLs. Why do you need caption of the group to be
exaclty <label>?

Side note #1:
  There is a funny note in the XHTML 2.0 (list module, nl's):
  "Note that a navigation list always starts with a label element that defines
the label for the list."
  What this means: "Must start" or "May start" ?  What if it does not?

Side note #2:
  True, |open| is not there. I am using it instead of inventing new state flag
  like :collapsed or so. Interesting question, btw - either attribute either
flag
  should be there. Without it how to style collapsed / open states?

Side note #3:
   "Navigation lists are intended to be used to define collections
    of selectable items for presentation in a "navigation" menu"

And what is wrong with:
<ul>
    <li href=url>something #1</li>
    <li>something #2
        <ul>
           <li>something #2.1</li>
           <li>something #2.2</li>
       </ul>
    </li>
</ul>

Any ideas why <nl>s were introduced?
Does <nl> has some special UI behavior like collapsible nodes?
If yes, how to style states then?


|
| > 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...

I was trying to answer on
"Consider this. If you want the submenu hidden and use "display: none"
 for when the <nl> element isn't focused, how will the user see the
<label>???"

Instead of [open] you may use :focus in style sheet above.  It answers on your
question.

If you will interpret "submenu hidden" as "submenu items hidden, but its label
not"
everything will be fine. Can you describe this in terms of current CSS? Yes, you
can.

This is what I was trying to express in the <style> above.

Andrew Fedoniouk.
http://terrainformatica.com

Received on Thursday, 27 October 2005 21:08:39 UTC