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

Re: Proposal: will-animate property

From: Vangelis Kokkevis <vangelis@google.com>
Date: Fri, 6 Dec 2013 09:30:42 -0800
Message-ID: <CAPf4+RwsRJ3oKPMinJgAhsLJYjuGPSCUTWxrWBEuq6TCYvLPww@mail.gmail.com>
To: Dirk Schulze <dschulze@adobe.com>
Cc: Nat Duca <nduca@chromium.org>, "Robert O'Callahan" <robert@ocallahan.org>, Ali Juma <ajuma@chromium.org>, www-style <www-style@w3.org>, "L. David Baron" <dbaron@dbaron.org>, Benoit Girard <bgirard@mozilla.com>, Matt Woodrow <matt@mozilla.com>, Cameron McCormack <cmccormack@mozilla.com>, "Tab Atkins Jr." <jackalmage@gmail.com>, Ojan Vafai <ojan@chromium.org>
On Fri, Dec 6, 2013 at 4:19 AM, Dirk Schulze <dschulze@adobe.com> wrote:

> On Dec 6, 2013, at 7:27 AM, Nat Duca <nduca@chromium.org> wrote:
> > Some folks try to get clever:
> > - translateZ(0) when the element is not moving, as a way to trick a layer
> > But then they do a 2d animation... using translate2d(x,y). This causes
> the element to lose its stacking context, triggering a repaint and possibly
> other unexpected behaviors.
> Short question off topic. What do you mean with “lose its stacking
> context”? Even 2D transforms create a stacking context and it should not
> lose it because of animations. Rather the opposite. In many implementations
> this even results in creating a layer.

I think what Nat meant to say here is that the element stops getting its
own layer. Setting translateZ(0) will promote it to have its own composited
layer but resetting its transform to a pure XY translation without an
explicit Z component will remove that layer and flatten the element back
with some ancestor. No changes in the stacking context will take place (and
hence no visual changes are expected) but a repaint of the ancestor's layer
will be necessary at that transition.
Received on Monday, 9 December 2013 09:04:00 UTC

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