W3C home > Mailing lists > Public > www-style@w3.org > May 2006

Re: [CSS3] What about "behavioral extensions to CSS"?

From: Christoph Wieser <wieser@cip.ifi.lmu.de>
Date: Tue, 09 May 2006 17:34:55 +0200
Message-ID: <4460B69F.9070005@cip.ifi.lmu.de>
To: www-style@w3.org
Cc: Francois Bry <bry@ifi.lmu.de>
Laurens Holst schrieb:
> In the model as it should be, scripting (or some other behavioural
> language) is used to bind the user interaction (the click) to a change
> in the state (in this case, toggle the selected state). The styling then
> styles purely based on whether the control is in ‘:selected’ (whatever
> it’s called) state or not, and whether it is or not does not depend on
> whether it is clicked once or twice or thrice, but on whether the
> behavioural layer put it into selected state at some point (e.g. it
> might also happen after a timeout, or by keyboard navigation).

I am sorry but I cannot see differences to my model on a conceptual
level. It seems to me that we are discussing whether it should be
defined declaratively or imperatively.

> I see your point in that :hover is not all that different from
> :onclick(), but once you start adding and using :onclick(1), etc. I
> think you’re moving too much of behavioural code into CSS. It’s not
> scripting —which is why expression() is bad, which is what I was mostly
> referring to—, but it’s getting way closer as you can very easily define
> different handlers for different user interactions (e.g. make it have
> steps in a wizard), basically allowing people to iteratively change the
> application through CSS, and that’s just the wrong place to do that.

Ah ok, I don't want to have the power of XSLT in CSS. That's why an
iterative application of rule is not permitted in CSS^NG. You can look
at it as a try to fathom where CSS ends and where XSLT starts.

> Basically, what I’m saying is that in some very small cases :onclick()
> could be useful, but in the majority of cases it can either be done with
> one of the existing (or maybe new) states, or it is behaviour defined in
> CSS. And that is why it should imho not be part of CSS.

Currently it cannot be done with CSS and you can always find a more
complex solution such as writing a script, :). However, the author of a
Web-page with no programming skills could use rather simple CSS^NG rules
for defining simple behaviour in a Web-page. I agree that there are only
a few classes of applications but there are still many applications in
each single class, ;).


Received on Tuesday, 9 May 2006 15:35:54 GMT

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