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

Re: Yet Another Suggestion For CSS3 (YASF-CSS3): Events

From: James Aylett <dj-www-style@insigma.com>
Date: Thu, 18 Feb 1999 09:32:57 +0000
Message-ID: <19990218093257.F24927@insigma.com>
To: www-style@w3.org
On Wed, Feb 17, 1999 at 11:59:46PM -0800, Bloo wrote:

> We have seen some event driven controls in CSS so far (specifically,
> the :active, :hover and :focus Pseudo-classes), but the HTML 
> event model goes far beyond this. It would be nice to have some 
> more formatting language independent event-driven addressing in CSS. 
> 
> A good pool to start from could be the 10 basic events in HTML 4:
> 
>    Click, double click, mouse down, mouse up, mouse move, mouse 
>    over, mouse out, key press, key down, key up

It might also be nice (although it would be starting to pollute CSS rather)
to be able to specify scripting elements in this way. I have a concrete example:

On a given site, I mark every book title, every film title, every show
title, using appropriate CSS classes, typically by doing <SPAN
CLASS="booktitle">The Wind In The Willow</SPAN>. It would be nice if I could
specify a mouse click handler for the entire class, so I don't waste time
(and probably sometimes forget) specifying the handler each time. (The
reason I don't want to use normal hyperlinks in this case is that typically
I don't want them followed; I want a button to 'turn on' a lookup mode which
sends the title as a query to IMDb, or wherever else is appropriate for
books, songs etc.; I suppose in theory I could have a load of links, and use
a button somewhere to toggle whether they work or not - but I can't think of
a convenient way of doing this.)

Yes, in theory I could write a handler for the entire page to do this, but
that will slow things down more, and isn't very elegant. In addition, I'm
sure there are other, more interesting, problems which could be simplified.

It's possible that one of DSSSL or XSL will provide this, but the link to
the DSSSL draft at Novell from the W3C pages gives me a DNS lookup failure,
and I haven't had a chance to get to grips with XSL yet.

Cheers,
James

-- 
/--------------------------------------------------------------------------\
  James Aylett, dj@insigma.com                    Insigma Technologies Ltd
  Tel: +44 (0)1285 643100                         Norcote Barn     Norcote
  Fax: +44 (0)1285 643600                         Cirencester      GL7 5RH
Received on Thursday, 18 February 1999 04:33:00 GMT

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