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

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

From: Perry Smith <pedzsan@gmail.com>
Date: Wed, 28 Apr 2010 12:07:53 -0500
Cc: Brad Kemper <brad.kemper@gmail.com>, www-style list <www-style@w3.org>
Message-Id: <F75D3FB5-F50C-48FA-A528-10CEBE4B59A3@gmail.com>
To: Boris Zbarsky <bzbarsky@mit.edu>

On Apr 28, 2010, at 8:55 AM, Boris Zbarsky wrote:

> On 4/28/10 9:35 AM, Perry Smith wrote:
>>> For example, if a browser batches up style changes and processes the batch all at once, the transition will start partway through the processing of the batch.  At this point, some of the pending style changes have been processed and some haven't; which ones have or haven't may well be effectively random.
>> In this scenario, even without transitions wouldn't there be the possibility that the attribute that was just set to auto to bounce around?  It seems like users would not like that either.
> I'm not sure I follow.  What issue do you see without transitions?
> _With_ transitions, the issue I'm concerned about is basically this:
>  div {
>    transition: height 1s;
>    height: 0;
>    width: 100px;
>  }
> Then I have:
>  <div id="x">This is some text that is 150px wide</div>
> and this script:
>   var div = document.getElementById("x");
>   div.style.height = "auto";
>   div.style.width = "200px";
> What height should the div transition to and why?  Note that in current UAs those two style changes can be processed in arbitrary order; the page can't detect the difference.

I feel stupid... sorry.  But I don't understand.  The UA has to figure out what the height is even when there is no transition for height.  Call this height N.  Then with the transition, isn't the final height still N ?

I thought you were worried about something much more complicated like if the element above is changing its height, perhaps also with a transition, at the same time the div element is changing its height with a transition too.

>> Seems like there is a middle ground somewhere.  Define the simple case where only one attribute is in flux at the time and it is going from fixed to auto or auto to fixed and declare that anything more complex the author will get a strongly worded letter from the UN :-)
> That is _exactly_ the reverse-engineering and author-complaint hellhole that's not acceptable, actually.  We already have this with first-line, and it's just broken beyond belief.

Ok.  Lets not go there.
Received on Wednesday, 28 April 2010 17:08:29 UTC

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