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

Re: [css3-transitions] Issues with starting transitions after inserting content

From: Simon Fraser <smfr@me.com>
Date: Fri, 25 Jun 2010 07:47:10 -0700
Cc: Boris Zbarsky <bzbarsky@mit.edu>, www-style list <www-style@w3.org>, nirvn.asia@gmail.com
Message-id: <9E825216-D8C1-490A-B34D-A2F1348847D2@me.com>
To: "L. David Baron" <dbaron@dbaron.org>
On Jun 24, 2010, at 11:43 PM, L. David Baron wrote:

> On Thursday 2010-06-24 20:29 -0700, Simon Fraser wrote:
>> The author is doing the following:
>> 
>>  container.appendChild(form);
>>  form.style.opacity = "1";
>> 
>> but the browser never renders the initial "opacity: 0" state, so a
>> transition does not occur. This is similar to wanting transitions
>> to run when "display" changes from "none" to something.
> 
> I've been thinking that a solution to this sort of thing is to have
> a script API to initiate a transition:  it would take the ending
> value, likely also a starting value, and perhaps also a value of the
> 'transition' property, and would be equivalent to setting
> element.style, but with a transition from the starting (or current)
> value.
> 
> I haven't thought about this in much detail yet, though.

That isn't really convenient for an author who just wants
to apply classnames to move between content states, though.

I guess an alternative is to expose a method to force style resolution
and layout (just as getting .offsetWidth) does now.

Simon
Received on Friday, 25 June 2010 14:47:45 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:28 GMT