W3C home > Mailing lists > Public > www-style@w3.org > October 2010

RE: [css3-transitions] shorthand/longhand handling in transition property

From: Sylvain Galineau <sylvaing@microsoft.com>
Date: Mon, 25 Oct 2010 21:47:19 +0000
To: Tab Atkins Jr. <jackalmage@gmail.com>, Simon Fraser <smfr@me.com>
CC: www-style list <www-style@w3.org>
Message-ID: <045A765940533D4CA4933A4A7E32597E2814A637@TK5EX14MBXC120.redmond.corp.microsoft.com>
> From: Tab Atkins Jr. [mailto:jackalmage@gmail.com]
> Sent: Monday, October 25, 2010 2:21 PM
> To: Simon Fraser
> Cc: Sylvain Galineau; www-style list
> Subject: Re: [css3-transitions] shorthand/longhand handling in
> transition property
> 
> On Mon, Oct 25, 2010 at 2:14 PM, Simon Fraser <smfr@me.com> wrote:
> > On Oct 22, 2010, at 3:04 PM, Sylvain Galineau wrote:
> >
> > The current Editor's Draft [1] defines both the following rules:
> >
> > # If one of the identifiers listed is a shorthand property,
> implementations
> > # must start transitions for any of its longhand sub-properties that
> are
> > animatable,
> > # using the duration, delay, and timing function at the index
> corresponding
> > to the
> > # shorthand.
> >
> > # If a property is specified multiple times in the value of
> > 'transition-property'
> > # (either on its own or via a shorthand that contains it), then the
> > transition that
> > # starts uses the duration, delay, and timing function at the index
> > corresponding to
> > # the last occurrence of the property.
> >
> > What seems undefined is whether the following results in a duplicate:
> >
> > transition-property: border-width, border-right-width;
> > transition-duration: 3s, 1s;
> >
> > In other words, should this be equivalent to (a):
> >
> > transition-property: border-top-width, border-bottom-width,
> > border-left-width, border-right-width;
> > transition-duration: 3s, 3s, 3s, 1s;
> >
> > Or (b):
> >
> > transition-property: border-top-width, border-right-width,
> > border-bottom-width, border-left-width, border-right-width;
> > transition-duration: 3s, 3s, 3s, 3s, 1s;
> >
> > Agreed that the spec needs to clarify this, and behavior (b) probably
> makes
> > most sense.
> 
> (b) is certainly how I expect this to work.

It seems David and I agree that your expectation is contrary to the current
spec prose which actually calls for a) :

# If a property is specified multiple times in the value of ‘transition-property’ 
# (either on its own or via a shorthand that contains it), then the transition that 
# starts uses the duration, delay, and timing function at the index corresponding to 
# the last occurrence of the property.

Note the "(either on its own or via a shorthand that contains it)" clause. This is what
WebKit does today afaict. 

The problem with b) is that we're saying two transitions may be running on the same
shorthand but I very much doubt that's desirable. I don't think we can or should 
collapse duplicates in some cases and not others.

Received on Monday, 25 October 2010 21:47:55 GMT

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