- From: Brad Kemper <brad.kemper@gmail.com>
- Date: Wed, 28 Apr 2010 10:25:58 -0700
- To: Brad Kemper <brad.kemper@gmail.com>
- Cc: Boris Zbarsky <bzbarsky@MIT.EDU>, Perry Smith <pedzsan@gmail.com>, www-style list <www-style@w3.org>
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