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

Re: Collapsing elements

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Tue, 26 Feb 2008 10:58:34 -0800
Message-ID: <47C4615A.8040505@terrainformatica.com>
To: Brad Kemper <brkemper@comcast.net>
CC: James Elmore <James.Elmore@cox.net>, www-style mailing list <www-style@w3.org>

Brad Kemper wrote:
>
> On Feb 26, 2008, at 12:12 AM, Andrew Fedoniouk wrote:
>
>> It is a trinity of equally valuable entities: DOM element, style and 
>> behavior.
>>
>>
>> De facto there is a set of behaviors already. All <input>s can be 
>> presented as set of declarations:
>>
>>
>> input[type="text"] { behavior: single-line-edit; ....}
>>
>> input[type="chekbox"] { behavior: checkbox; ...}
>>
>> input[type="radio"] { behavior: radio; ...}
>>
>>
>> If you will start think this way then suddenly you will discover
>>
>> that you can reuse behaviors for almost all other UA activation needs.
>>
>>
>> E.g. some list with <li> that have assigned behavior:radio to them
>>
>> may behave as an accordion widget with proper styling.
>>
>>
>> So it is a matter of separation of behavior from dom element and styling
>>
>> that according to old "divide et impera" principle will only help us 
>> to reach new quality.
>>
>
> That's one small step (or perhaps one giant leap) beyond what I was 
> talking about, but I would welcome it, if we could ever get to that 
> point. It would seem that radio and checkbox behaviors could apply to 
> a wide variety of elements, but I have a hard time imagining what it 
> would mean to apply a single-line-edit behavior to a UL, or a 
> pop-up-menu behavior to a radio input, for instance.
Think about this:

table#spreadsheet > td:not(:first-child)
{
   behavior: single-line-edit;
   text-wrap:none;
   overflow:hidden;
}

<table id="spreadsheet">...
   <td>#1</td><td>123.34</td><td>456.78</td>
</table>

It will declare all cells in the table (except in first column) to be 
editable.

And:
  
   input[type="radio"] { behavior: pop-up-menu; }

will replace intrinsic behavior:radio by the new one for applied 
elements.  May or may not have any sense.

But (css) : 
 
   menu { behavior: menu-bar; }
   menu menu { behavior: pop-up-menu; }
   menu menu li.option { behavior: radio; }

does have sense. Isn't it?

--
Andrew Fedoniouk.

http://terrainformatica.com
Received on Tuesday, 26 February 2008 18:59:00 GMT

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