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

Re: when do transitions occur?

From: L. David Baron <dbaron@dbaron.org>
Date: Wed, 14 Sep 2011 12:05:59 -0700
To: Brian Manthos <brianman@microsoft.com>
Cc: "Tab Atkins Jr." <jackalmage@gmail.com>, Jennifer Yu <Jennifer.Yu@microsoft.com>, "www-style@w3.org" <www-style@w3.org>
Message-ID: <20110914190559.GA32079@pickering.dbaron.org>
On Wednesday 2011-09-14 17:48 +0000, Brian Manthos wrote:
> 1. Are there any scenarios where an event should fire for the shorthand due to transitioning?

No (in my opinion).

> 2. Or are component longhands the only events that ever fire for transitioning?


> 3. If 2, should longhands that are unchanged in value but members of a shorthand that is explicitly transitioned be excluded from the events?

Yes.  Transitions are triggered by changes in computed value (see
section 3, Starting of Transitions).  It doesn't matter whether
these changes occurred because a shorthand was changed or because
the individual longhand properties were changed.  Only longhand
properties have computed values, and only those whose computed
values changed should have events.

> Example A:
> 	from	background: blue;
> 	to	background: transparent;
> A1: background
> A2: background-color
> A3: background-image
> A4: background-* (all 8)
> A5: A2 and A3
> A6: A1, A2, and A3
> A7: A1 and A4
> A8: something else
> My evaluation of each event set option:
> A1: it's the author-aligned delta
> A2: (doesn't make sense in isolation)
> A3: (doesn't make sense in isolation)
> A4: all longhands are involved in the delta, no culling of unchanged properties
> A5: all longhands are involved in the delta, only include changed properties
> A6: same reasons as A1 and A5, both apply
> A7: same reasons as A1 and A4, both apply
> A8: (tbd)

I think it's clearly A2, since background-color is the only property
whose computed value changed.  (Also, many of the background-*
properties aren't animatable at all.)


𝄞   L. David Baron                         http://dbaron.org/   𝄂
𝄢   Mozilla Corporation               http://www.mozilla.com/   𝄂
Received on Wednesday, 14 September 2011 19:06:28 UTC

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:04 UTC