W3C home > Mailing lists > Public > www-style@w3.org > April 2010

Re: transitions vs. animations

From: Anne van Kesteren <annevk@opera.com>
Date: Sun, 04 Apr 2010 11:50:15 +0200
To: www-style@w3.org, Håkon Wium Lie <howcome@opera.com>
Message-ID: <op.vamtl1ki64w2qv@annevk-t60>
On Sat, 03 Apr 2010 10:06:38 +0200, Håkon Wium Lie <howcome@opera.com>  
> Then we have to attach this animation to two events: when the element
> is hovered over, an and when it is un-hovered over. We'd like to do
> this without adding an event model to CSS. Let's make up a syntax:
> [example 3]
>   .blue-box:hover {
>     effect: on-entry bounce 1s, on-exit bounce 1s;
>   }
> The above uses two new keywords: 'on-entry', 'on-exit'. These are
> values on the 'effect-delay' property. That is, 'on-entry' is equal to
> 0 in the current draft so that the animation starts immediately when
> hovering occurs. The 'on-exit' keyword has no numeric equivalent, but
> is interpreted to mean that the delay should last until un-hovering
> occurs. In both cases, the effect will last for one second.

I think the problem is that this proposal assumes an element can only be  
in one state. What if an element just matches :hover at first, but then  
also matches :focus? And then no longer matches either? This works fine  
with transitions as they are today, because it is just the property values  
that change and they are animated as specified by the transition  
properties. I don't really see how it can work with anything that assumes  
there's an entry and exit for a given state.

Anne van Kesteren
Received on Sunday, 4 April 2010 09:50:57 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:33 UTC