Re: [css3 animations][css3 transitions] ambiguous or unclear shorthand grammar

On Thursday 2012-09-20 10:22 -0400, Carine Bournez wrote:
> But it seems to me that the intent of the spec is that the comma separates each animation,
> so the correct thing to write would be:
> ex { animation: normal 1s none, reverse 1s forwards, 1s }

Yes.

> Also there's surely an ambiguity since animation-name and animation-fill-mode both
> allow "none" as a value. (maybe change one of those 2 names?)

This is true for any keyword value of another property interacting
with animation-name, since animation-name accepts any keyword.  (See
http://lists.w3.org/Archives/Public/www-style/2011Apr/0344.html .)

> My suggestion is to rewrite the grammar in the same style as background is written:
> - rewrite all the animation-xyz properties e.g. for animation-fill-mode:
> 
> <animation-fill-mode> =  <anim-fill-mode> [, <anim-fill-mode> ]*
> 
> with <anim-fill-mode> = [ none | forwards | backwards | both ]

Agreed, though I'd probably switch to something like
<fill-mode-item> to make it a little more different from the name of
the property.  This would also make the syntax clearer and reduce
the risk of editing errors.

And the same issue applies to
http://dev.w3.org/csswg/css3-transitions/

> - describe the shorthand in terms of anim-xyz instead of animation-xyz:

Yes, agreed.

-David

-- 
𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                           http://www.mozilla.org/   𝄂

Received on Thursday, 20 September 2012 16:43:44 UTC