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

On Thu, Sep 20, 2012 at 12:17:23PM -0700, L. David Baron wrote:
> > > 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 .)

For this one, I was wondering why animation-name was not a string. But even
if it were, there would still be the problem of 'none'. Your suggestion
to check animation-name last would make the first 'none' always considered as
an animation-fill-mode when you see 'none' twice in a single animation, but
since the shorthand has comma-separated animations, it might be difficult
for a stylesheet writer to detect errors like a missing comma (a 2nd 'none'
being in a 2nd animation and that gets interpreted as an animation-name of
the first animation).
It seems easier to change one of those 2 'none' to something else. The 
potential conflict of the animation-name with a keyword is much less likely.

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

Great. Thanks.
 
> (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.

Why should it be invalid (apart from the fact that it seems a stupid thing
to write)?


-- 
Carine Bournez -+- W3C Europe

Received on Friday, 21 September 2012 09:38:59 UTC