W3C home > Mailing lists > Public > www-style@w3.org > February 2008

Re: Collapsing elements

From: Brad Kemper <brkemper@comcast.net>
Date: Thu, 21 Feb 2008 07:26:05 -0800
Message-Id: <075FD73F-AEEE-49D9-A60E-761A518D625A@comcast.net>
Cc: Bert Bos <bert@w3.org>, www-style <www-style@w3.org>
To: Daniel Glazman <daniel.glazman@disruptive-innovations.com>


On Feb 21, 2008, at 2:10 AM, Daniel Glazman wrote:

>
> Bert Bos wrote:
>
>
>> Another example:
>>     div:initial * {display: none}
>>     div:initial h2 {display: block}
>>     ...
>>     <div>
>>       <h2>Heading of this section</h2>
>>       <p>First paragraph...
>>       ...
>>     </div>
>
> Right, that works for LI and sub-lists. But how do you
> query from JS the state of such a list item, expanded or
> collapsed ? Checking the computed value of the display
> property on all children of that LI is not a workable
> solution.
>
> We need to be able to query 'something' directly from the LI.
> That means a solution based uniquely on the display property
> of the children is not enough. We need an attribute on the LI
> or a unique CSS property setting the expanded/folded status
> of the item.
>
> </Daniel>
>

How about "checked"? Its not perfect, but it does represent a toggle  
between an on and off state, is well supported in JavaScript (at  
least on checkboxes and radio buttons), and has a pseudo-class in CSS-3.
Received on Thursday, 21 February 2008 15:26:23 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:01 GMT