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

Re: 'animation' and 'transition' ambiguity?

From: L. David Baron <dbaron@dbaron.org>
Date: Thu, 20 Jan 2011 15:14:52 -0800
To: "Eric A. Meyer" <eric@meyerweb.com>
Cc: www-style@w3.org
Message-ID: <20110120231452.GA15549@pickering.dbaron.org>
On Thursday 2011-01-20 17:52 -0500, Eric A. Meyer wrote:
>    The point is that the value definition of 'transition' doesn't
> conform with the prose, which seems like a serious mistake to me.
> It should be possible to write syntax that doesn't require the text,
> right?  All that's needed is to decide which pattern to support and
> then fix the syntax to match.

There are plenty of cases where the prose expresses additional
restrictions over the syntax in the property's header.

I think expressing this syntax in the property definition would make
it pretty close to unreadable; you'd end up with something like (for
transition, the simpler case):

 ((<'transition-timing-function'> || <'transition-property'>)
  (<'transition-duration'> <'transition-delay'>?)?) |
 (<'transition-duration'>?
  (<'transition-timing-function'> || <'transition-property'>)) |
 (<'transition-duration'>
  (<'transition-timing-function'> || <'transition-property'>)
  <'transition-delay'>) |
 ((<'transition-duration'> <'transition-delay'>?)?
  (<'transition-timing-function'> || <'transition-property'>)) |

If we want the syntax to express this, I'd prefer saying that the ||
syntax, in cases of ambiguity, prefers filling whichever item in
the || is listed first.  This would mean that:
  <'transition-duration'> || <'transition-delay'>
would express the rule we want in this case whereas
  <'transition-delay'> || <'transition-duration'>
would express the opposite.  However, I'd rather not do this, since
the syntax is magical enough (and CSS-specific enough) already.

-David

-- 
L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/
Received on Thursday, 20 January 2011 23:15:21 GMT

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