W3C home > Mailing lists > Public > www-style@w3.org > March 2011

Re: [css3-animations] animation-delay, onload, and animation-fill-mode

From: Simon Fraser <smfr@me.com>
Date: Thu, 31 Mar 2011 12:21:10 -0700
Cc: www-style@w3.org
Message-id: <03637D93-39DF-4E63-A0F5-1F1711A8E876@me.com>
To: "L. David Baron" <dbaron@dbaron.org>
On Mar 31, 2011, at 11:36 AM, L. David Baron wrote:

> I'm trying to understand what css3-animations says about how
> 'animation-fill-mode' interacts with animations not starting until
> the document's load event has fired.
> 
> For a start, this bit of the spec:
>  # An ‘animation-delay’ value of ‘0’ means the animation will
>  # execute as soon as it is applied.
>  http://dev.w3.org/csswg/css3-animations/#the-animation-delay-property-
> contradicts this:
>  # The start time of an animation is the latter of two moments: the
>  # time at which the style is resolved that specifies the
>  # animation, or the time the document's load event is fired.
>  http://dev.w3.org/csswg/css3-animations/#animations
> and I presume the former should be fixed.
> 
> Second, the second of the above pieces of text introduces the issue
> that there are times before a document has loaded when the timing
> relative to the start time of the animation is unknown.  It's clear
> to me that for animations with a positive animation-delay, the style
> from the animation does not apply while the document is loading,
> unless animation-fill-mode is 'both' or 'backwards' (in which case I
> presume it should).
> 
> But for animations with a zero or negative animation-delay, should
> the style from the animation apply during the document load, as
> though the current time relative to the animation start were '0', or
> should it not apply as though the current time were a large negative
> number?

We initially put in that text about waiting for the load event to fire to
match SVG animations, but WebKit now just starts animations whenever
it resolves the animation style. Waiting for the load event prevents
authors from running CSS animations as the page is loading, which
seems pointless.

So I think this removes the ambiguity.

Simon
Received on Thursday, 31 March 2011 19:21:46 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:38 GMT