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

Re: Ordering in 'animation' shorthands

From: L. David Baron <dbaron@dbaron.org>
Date: Wed, 22 Jan 2014 17:19:13 -0800
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: www-style list <www-style@w3.org>
Message-ID: <20140123011913.GA10428@crum.dbaron.org>
On Wednesday 2014-01-22 16:43 -0800, Tab Atkins Jr. wrote:
> On Wed, Jan 22, 2014 at 4:37 PM, L. David Baron <dbaron@dbaron.org> wrote:
> > On Wednesday 2014-01-22 15:46 -0800, Tab Atkins Jr. wrote:
> >> Issue 3 in Animations talks about the ordering behavior of parsing the
> >> 'animation' shorthand.  It implies that values are parsed as the first
> >> type they can match, using the ordering given in the grammar.
> >>
> >> Since the very first term in the grammar is <'animation-name'>, which
> >> is a <custom-ident>, this implies that the first keyword, regardless
> >> of what its value is, is always the animation name.
> >>
> >> Is this the intention?  Blink doesn't currently do this (though we
> >> have tests that match the spec, which we're currently failing).
> >> Instead, we assign keywords to the other grammar terms if possible.
> >> If a keyword doesn't belong to any other grammar term, we assume it's
> >> the animation name; otherwise, we take the last keywords as the
> >> animation-name.
> >
> > Agreed:
> > http://lists.w3.org/Archives/Public/www-style/2011Apr/0344.html
> Let's change it, then?

Fixed in https://dvcs.w3.org/hg/csswg/rev/68697748c5cc .

I left some ambiguity in the required serialization, but we might
want to tighten that as well.  I'd prefer to just require that the
serialization always output all the keywords (as Gecko does) since
it's a pain to determine whether disambiguation is needed, and
consistent behavior seems less likely to trip up authors who depend
on the serialization behaving in a particular way.

(I'd also note I found some interesting slightly-out-of-date-Blink
bugs while testing its parsing and serialization of the 'animation'
shorthand, such as the value parsed from 'backwards 3s forwards'
being serialized as 'forwards 3s backwards'.)


𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla                          https://www.mozilla.org/   𝄂
             Before I built a wall I'd ask to know
             What I was walling in or walling out,
             And to whom I was like to give offense.
               - Robert Frost, Mending Wall (1914)

Received on Thursday, 23 January 2014 01:19:39 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:38 UTC