Re: 'animation' and 'transition' ambiguity?

On Jan 30, 2011, at 4:10 PM, Eric A. Meyer wrote:

> At 12:44 PM -0800 1/30/11, Dean Jackson wrote:
>> On Jan 21, 2011, at 6:58 AM, Eric A. Meyer wrote:
>>> At 3:14 PM -0800 1/20/11, L. David Baron wrote:
>>>> There are plenty of cases where the prose expresses additional
>>>> restrictions over the syntax in the property's header.
>>>   I suppose, but I keep coming back to 'font', which defines a certain placement for the things it requires and the order in which they are required.  It doesn't seem like it would be that hard to do it here as well.  Perhaps to require that they appear together. For example:
>>>   <'transition-timing-function'> || <'transition-property'> ||
>>>   [ <'transition-duration'> <'transition-delay'>? ]
>>> Right?  Similar for 'animation', only with two more sets of angle brackets.  That seems like it should have the desired effect.  It's pretty much the proposed version using a slash to separate them, except without the slash.  That seems to me to clarify the intent and not require magic prose.
>> Are you suggesting that the shorthands always require you to specify a delay if you give a duration? I don't like that, but I agree that the current approach can be confusing (and you're definitely not the first to complain).
>   No; that's why I put a question mark after the delay.

Sorry, I missed that!

>  By that I was attempting to say that if there is one time value, it always refers to the duration; if there are two, the second value always refers to the delay.

Sounds good to me. It's the way I think of it in my head anyway, even if the spec doesn't say it. In fact, I probably think of it that way because the WebKit implementation operates like this.

>  Sort of like "if there is one length value it refers to both horizontal and vertical; if there are two length values the first is always horizontal and the second always vertical" setup of some properties.
>   In other words, I believe it's the currently prose-specified behavior, except that it requires the duration and delay (if any) to be placed together and in a certain order, and thus it can be expressed in what seems to be straightforward syntax.

WebKit doesn't require them to be placed together, but it does enforce the order you suggest.


> -- 
> Eric A. Meyer (

Received on Thursday, 3 February 2011 00:11:07 UTC