Re: [css3-transitions] Why isn't the display property animatable?

Rereading your case, I misunderstood the use case.
It does not make sense to have interpolated values between distinct steps
as Andy request.

Another issue is what 'getComputedStyle' would return during the
transition...

Rik

On Mon, May 28, 2012 at 10:01 PM, Tab Atkins Jr. <jackalmage@gmail.com>wrote:

> On Mon, May 28, 2012 at 11:01 AM, Andy Earnshaw <andyearnshaw@gmail.com>
> wrote:
> > I'm not suggesting that other properties be affected by animating
> `display`,
> > per se, just that the appearance be animated in a similar manner to that
> of
> > the `height` or `width` property transition (nowhere did I mention
> > `opacity`, I guess you got that from jQuery). What I'm suggesting is a
> > simple transition from one value to another, either the rendered box's
> > physical height or width. It isn't any more complex than animating the
> > `width` or `height` properties themselves; as far as I can tell, the only
> > complexities would occur when either the from or to value isn't `none` --
> for
> > which, I'm suggesting we do not animate if there are technical problems
> with
> > doing so.
> >
> > Basically, I'm pretty much trying to say that at least some form of
> > animation on the `display` property would be a great asset to web
> developers
> > and, after thinking a great deal about it, the only type of animation
> that
> > makes sense to me is incremental adjustments to the rendering box's
> height
> > or width. If that seems odd to you, perhaps you have an idea of how
> > `display` could be animated in a more appropriate manner? Like I said
> > before, some box types cannot be animated as simply as most web
> developers
> > would like and animating the `display` property would fix this.
>
> "Just changing the rendered width/height" isn't so simple,
> unfortunately.  How does that interact with another animation
> animating width or height explicitly, for example?
>
> This is why, so far, all the animatable property types are animated
> solely by doing a linear interpolation of some numbers in the
> representation.  That's easy to understand and self-contained.
>
> As for me thinking it odd, if we assume that all the difficulties with
> a property transition affecting other properties have been ironed out,
> then I merely think it odd to choose one particular method of
> animating 'display' as the "correct" default version when there are
> several equally-valid ways to do that.  That is why I referred to
> jQuery - they provide three different versions in the core library,
> all of which I've used at some point in my webdev experience.  If we
> were to do this kind of thing, we should do it in a way that's
> extensible, so authors can choose which kind of effect they want for
> fading something in/out, and even create their own.
>
> ~TJ
>
>

Received on Monday, 28 May 2012 20:16:59 UTC