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

Re: [css3-transitions] transitioning to/from auto value

From: Chris Marrin <cmarrin@apple.com>
Date: Wed, 28 Apr 2010 10:25:49 -0700
Cc: Simon Fraser <smfr@me.com>, "Tab Atkins Jr." <jackalmage@gmail.com>, Brad Kemper <brad.kemper@gmail.com>, www-style list <www-style@w3.org>
Message-id: <CABC64D8-D1A6-4ED0-A676-D9AD4A6DF221@apple.com>
To: Perry Smith <pedzsan@gmail.com>

On Apr 27, 2010, at 5:48 PM, Perry Smith wrote:

> On Apr 27, 2010, at 3:36 PM, Simon Fraser wrote:
>> On Apr 27, 2010, at 11:16 AM, Tab Atkins Jr. wrote:
>>> On Mon, Apr 26, 2010 at 11:36 AM, Brad Kemper <brad.kemper@gmail.com> wrote:
>>>> On Apr 26, 2010, at 10:56 AM, Simon Fraser <smfr@me.com> wrote:
>>>>> The main issue is that, when transitioning to an 'auto' height, the user
>>>>> agent would have to do a layout for the page in its final state in order to
>>>>> determine the destination height of the element. And, of course, that height
>>>>> may depend on all sorts of other style rules, some of which themselves may
>>>>> be animating, and which could also change for other reasons while the
>>>>> transition is running.
>>>> I figured that was the issue, but I think that even the transition was based
>>>> on a snapshot of the used values at the beginning or end of the transition,
>>>> that would be huge, and be closer to what JavaScript animation libraries can
>>>> do.
>>> I suspect that this would be sufficient as well.  We definitely need
>>> the ability to transition to auto in some manner, and I think just
>>> doing a single tentative layout to establish an end-point for the
>>> transition will be "good enough".
>> I'm very reluctant to put something in a specification for which a correct implementation would be extremely difficult, and for which a "reasonable" implementation would show glitches in many common situations. I know that if we ended up implementing your suggestion in WebKit, it would not be long before we get a bug about transitioning to an 'auto' value using the wrong target size.
> Can the spec state exactly how the final value would be computed?
> e.g. the final value will be computed based upon the state of the page at the instant the transition starts (with the attribute now set to 'auto')

And what happens at the end of the transition if the computed value is different from the one we just transitioned to (by computing it at the start of the transition)? It would have to snap to that value at the end of the transition. This would no doubt be submitted as a bug many times on each browser.

I don't think we can have rules that "sometimes", "often" or even "usually" do the right thing. I think the only choice is to disallow 'auto' in transitioned properties.

Received on Wednesday, 28 April 2010 17:26:23 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:07:45 UTC