Behaviors, was: Re: Styling by attribute-based association?

----- Original Message ----- 
From: "Orion Adrian" <orion.adrian@gmail.com>


|
| On 10/25/05, ACJ <ego@acjs.net> wrote:
| > The CSS2 attribute selector [1] allows you to style labels with a for
| > attribute like this:
| >
| > label[for] { border: thin dashed }
| >
| > The first case you discribe (1) is not possible with current CSS, but
| > one could argue if it should. It sounds like behaviour to me (and should
| > therefor be handled by script).
|
| Behavior is a ill-defined thing. What's your definition for it? Or is
| it, "I know it when I see it."
|

I am defining "behavior" as a set of functions - event handlers:
on_mouse_down, on_mouse_up, etc. attached to the DOM element.
Each such set is responsible for implementation of particular behavior of the 
element -
its reaction on users actions. Purpose of behavior functions is to modify
DOM elements - their attributes, state flags (:visited, :hover, etc) and content 
in the
way they seen to CSS engine. CSS and such behaviors peacefully coexist -
behavior changes state, CSS renders it.

Here is an example of <select> element which is pure DOM element with
attached "input-select" behavior. Any compnent of <select> (option, optgroups) 
is a
DOM element styled as anything else.

http://www.terrainformatica.com/htmlayout/images/selects2.jpg
And here is a dropdown select behavior:
http://www.terrainformatica.com/htmlayout/images/selects3.jpg
(Behavior in this case just enumerates <option>s placed in any arbitrary 
markup.)

( To see this alive with HTML/CSS samples download 
http://terrainformatica.com/htmlayout/PandoraHTMLayoutSDK.zip
- temporary link , will expire pretty soon )

Andrew Fedoniouk.
http://terrainformatica.com




| --
|
| Orion Adrian
|
| 

Received on Tuesday, 25 October 2005 20:55:01 UTC