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

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

From: Tobias Ritzau <tobias@ritzau.se>
Date: Wed, 26 Jun 2013 01:30:41 +0200
Message-ID: <CALYHq=3F03YGDY4yrVG5-PNVfgk=jC1ar=RUp3Q6THvx9pJL8Q@mail.gmail.com>
To: Řyvind Stenhaug <oyvinds@opera.com>
Cc: www-style@w3.org
Thanks for the quick response :) Ok, so is my workaround sound? Or is it
required to have two requestAnimationFrame() calls nested to ensure that
the animation will be triggered?

-- Tobias


On Tue, Jun 25, 2013 at 7:12 PM, Řyvind Stenhaug <oyvinds@opera.com> wrote:

> 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/<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<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 <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 23:31:09 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:12 UTC