W3C home > Mailing lists > Public > www-style@w3.org > January 2012

Re: [CSS Transitions] z-index & not animating one property

From: Witold Baryluk <baryluk@smp.if.uj.edu.pl>
Date: Sat, 14 Jan 2012 06:08:41 +0100
To: "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: Antoine Sanchez <ckkoshi@gmail.com>, www-style@w3.org
Message-ID: <20120114050841.GJ11692@smp.if.uj.edu.pl>
On 01-13 17:00, Tab Atkins Jr. wrote:
> On Fri, Jan 13, 2012 at 3:06 PM, Antoine Sanchez <ckkoshi@gmail.com> wrote:
> > Hello world,
> >
> > I'm coming here to understand why z-index is under the animation of
> > css-transition?
> > I don't understand the usability of animating this property.
> >
> >
> > Also, I come with my second question:
> > It's possible to use transition-property to select any property, but
> > if we want to animate all properties except one, we have to specify
> > all properties to animate, it's not useful.
> >
> > something like:
> > transition-property:all, !z-index;
> >
> > could be useful.
> z-index is animatable because why not?  It's a number, and numbers can
> be transitioned.

It is discrete number, and how will transitioning work from z-index: 1
to 2? It will jump? What will javascript get when it will ask for
current in-flight z-index (with current or future api)?

For all other numbers, transitioning makes sense because they are more
or less continious, but z-index?

>  I agree that there's not a lot of use, but given how
> simple it is once you support animating other numeric properties,
> there's no reason to shut it down.
Well, yes, if it is easy to implement, then why not. But I agree, than
relaying on transition-property: all, is very dangerous, even more
because most tutorials on the Internet uses 'all' in their examples.

> > transition-property:all, !z-index;
isn't best solution. What if future css transitions will add something
more to the list of transitable properties? I guess, we should just
recomend webdevelopers to explicitly list properties they want to


Witold Baryluk
Received on Saturday, 14 January 2012 05:09:22 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:09 UTC