Re: [css3-transitions] Transition from display: none

On Tue, 25 Jun 2013 15:47:38 +0200, Tobias Ritzau <tobias@ritzau.se> wrote:

> Hi all, it seems as all major implementations of
> http://www.w3.org/TR/css3-transitions/ handle transitions from "display:
> none" the same way: there is no transition. That cause code that, as far  
> as
> I can see, get complex for no reason. I can't trace this to the spec. Is  
> it
> in there?

I don't see it either, although it was resolved some time back as minuted  
in <http://lists.w3.org/Archives/Public/www-style/2012Jan/0099.html>.

There's also a long thread (spanning multiple months) linked there,  
starting at  
<http://lists.w3.org/Archives/Public/www-style/2011Dec/0353.html>.

One might do something like

elem.style.display = 'block';
elem.offsetWidth;
elem.style.opacity = 1;

to try to force calculation of computed values for the new box before  
modifying the property for which a transition is desired, but the exact  
details of when such calculations aren't well-defined and as the thread  
above indicates, it gets complicated.

-- 
Øyvind Stenhaug
Opera Software ASA

Received on Tuesday, 25 June 2013 17:15:18 UTC