W3C home > Mailing lists > Public > www-style@w3.org > October 1999

Re: New Working Draft : BECSS

From: Tantek Celik <tantek@cs.stanford.edu>
Date: Sun, 03 Oct 1999 23:02:01 -0700
To: jelks@jelks.nu, www-style@w3.org
Message-ID: <1273105598-396713753@psdbay.com>
>From: "Jelks Cabaniss" <jelks@jelks.nu>

> Chris Wilson wrote:
> 
>> As many as makes sense.  Some authors will want to have their behavior
>> separate from their style, others will consider it all part of the same
>> presentation of their content.  CSS is about presentation, after all - and
>> like it or not, event handling and interactivity is part of presentation.
>
> Clicking the mouse = presentation???  I'd say that's stretching!  :)

The point is that interactivity is part of presentation. Presentation is not
necessarily static.  It can be, but it doesn't have to be.  CSS covers
static and dynamic media types. [1]

>> If it isn't, then we need to pull :hover, :active, :focus and :visited out
>> of CSS.
>
> That might not be a bad idea if they are replaced by another well-thought-out
> mechanism.  Those are indeed "events",

They're not events, they're states.

onmouseenter and onmouseleave are events (state transitions) between an
element being in the hover state and not being in the hover state.

onmousedown and onmouseup are events (state transitions) between an element
being in the active state and not being in the active state.

as are onfocus and onblur to :focus

visited doesn't have any corresponding standard events that I know of that
denote when an element is entering or exiting the :visited state.  perhaps a
hole in the DOM?

In any case, in every example of events and corresponding state(s), it takes
*two* (or more? e.g. onclick) additional events to "describe" the same
behavior as you can with *one* additional state (the default "resting" state
is common to all the states).

states *are* a simpler, more well-thought-out mechanism than events.

they allow you to declaratively describe the end result - the what, instead
of having to procedurally describe the transitions - the how.

Tantek

[1] http://www.w3.org/TR/REC-CSS2/media.html#media-groups
Received on Monday, 4 October 1999 02:02:19 GMT

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