- 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
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 UTC