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

[css3-animations] animation-play-state

From: Dr. Olaf Hoffmann <Dr.O.Hoffmann@gmx.de>
Date: Sat, 4 Apr 2009 15:52:49 +0100
To: www-style@w3.org
Message-Id: <200904041652.49646.Dr.O.Hoffmann@gmx.de>

this comment is about

a) As far a I understand this, one can note something like

@keyframes 'example' {
    0% {left: 0;top: 0;}
    50% {left: 100px;top: 100px;}
   100% {left: 0;top: 0;}

div#sample {
    animation-name: 'example';
    animation-duration: 5s;
    animation-iteration-count: infinite;
    animation-play-state: paused

div#sample:hover, div#sample:active
animation-play-state: running

This will enable the user to begin the animation with 
:hover or :active, for example a click with a pointing device

But it is noted with red styling:
"We are considering removing ‘animation-play-state’ since its behaviour can be 
replicated using other techniques. For example, by querying the computed 
style, removing the animation and then setting style."

How is especially the querying of the computed style done natively with CSS
without using another language (like scripting) to do this?
How does the CSS for the application above look like without the 
animation-play-state property?

b) The current problem with CSS animations seems to be, that in the 
sample above the animation does not continue, if in this case the 
:hover and :active are not applicable anymore - right? It will be
paused, because then the styling for div#sample applies again?
How to manage such an application of an animation starting with
a user-interactivity and not stopping it again immediately, what happens
for example typically immediately with :active, because no user will 
continue to press for example the pointing device all the time.
How to realise this in a native CSS animation way?
Another value for animation-play-state could maybe manage such
a continuation of the animation, for example a value like 'start'
could indicate, that the animation is started and kept running until
it is over or the animation-play-state is changed again.
Another value like 'end' could end the animation without applying
the current value of the animation.

Received on Saturday, 4 April 2009 14:56:13 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:35 UTC