- From: Jordan OSETE <jordan.osete@laposte.net>
- Date: Fri, 05 May 2006 22:45:14 +0200
- To: Christoph Wieser <wieser@cip.ifi.lmu.de>
- CC: www-style@w3.org
Christoph Wieser wrote:
> ---- Example 2: Dynamic Styling using CSS Combinators ----
> tab:onclick(2n+1) + * { display:none; }
> tab:onclick(2n+2) + * { display:block; }
>
> After an _odd_ number of clicks on a tab element
> the following sibling is _"folded"_ and
> after an _even_ number of clicks on a tab element
> the following sibling is _"unfolded"_.
> ----------------------------------------------------------
>
> These examples are taken from the following paper:
> http://www.pms.ifi.lmu.de/publikationen/PMS-FB/PMS-FB-2006-9/css-ng.pdf
After reading through it quickly, I agree that this would provide
interresting extensions, as well.
Especially, i like the idea of presenting different selectors depending
on the number of times an event was triggered, and the way it is
expressed is really simple and functionnal.
To take a simple animation example, it would also come in handy many
times, used with the onevent syntax:
div:onclick(2n+1) {onclick: "animOpen(this)";}
div:onclick(2n) {onclick: "animClose(this)";}
Instead of having to keep track each time in the script of wich
animation to use for each element (of course that is just a very basic
example to show how the two syntaxes would mix together).
Jordan OSETE
Received on Friday, 5 May 2006 20:42:19 UTC