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

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

From: Brad Kemper <brad.kemper@gmail.com>
Date: Wed, 28 Apr 2010 10:25:58 -0700
Cc: Boris Zbarsky <bzbarsky@MIT.EDU>, Perry Smith <pedzsan@gmail.com>, www-style list <www-style@w3.org>
Message-Id: <0D4A5119-AED7-4237-8275-7570B4CA8833@gmail.com>
To: Brad Kemper <brad.kemper@gmail.com>

On Apr 28, 2010, at 10:22 AM, Brad Kemper wrote:

>> In Gecko that's not necessarily the case at all.  Note that the key is that style changes are coalesced; they are NOT processed when you make the .style.whatever change but at some later point in time. 
> Hmm. Maybe instead of just snapshotting the values, you also let other properties continue to change that snapshot of what "auto" means. Don't you have to do that sort of thing anyway for other values, such as percentages or ems/font-size? For instance:
> div#x {
>  transition: margin-right 1s;
>  margin-right : 0;
>  width: 100px;
> }
> Then I have:
> <div>
> 	<!-- The parent node is inside a 1000px padding box -->
> 	<div id="x">This is some text that is 150px wide</div>
> </div>
> and this script:
> var divX = document.getElementById("x");
> divX.style.marginRight = "50%";
> divX.parentNode.style.width = "200px";

What I mean, in case I wasn't clear, is that, just as you have to update the "to" part of the transition for what percentage means here, so too could you update the "to" part of the transition for what "auto" means to height.
Received on Wednesday, 28 April 2010 17:26:37 UTC

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