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

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 UTC