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

On Thursday 2012-09-20 09:43 -0700, L. David Baron wrote:
> 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.

This is now fixed in the editors drafts of both css3-transitions and
css3-animations in http://dvcs.w3.org/hg/csswg/rev/096a42f389d8 .

(Though I'm not especially happy about having to use <time> directly
in the production for the shorthand; maybe I should introduce
<single-transition-duration> = <time>, etc.)

I also noticed that the spec didn't say what to do when 'none'
(for 'transition-property') occurred in a 'transition' shorthand
with more than one item.  I specified in prose that the shorthand is
invalid when that happens, but I didn't try to express it in the
grammar.

-David

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

Received on Thursday, 20 September 2012 19:17:47 UTC