W3C home > Mailing lists > Public > www-style@w3.org > September 2015

Re: [css3-animations] Establishing stacking context at animation start

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Mon, 28 Sep 2015 16:27:12 -0700
Message-ID: <CAAWBYDD2MG0z=YbtVN01Y=Tsfu-MWeRJaVZYoB0m_wsVeEEGYQ@mail.gmail.com>
To: Simon Fraser <smfr@me.com>
Cc: "www-style@w3.org list" <www-style@w3.org>
On Sun, Sep 27, 2015 at 11:59 AM, Simon Fraser <smfr@me.com> wrote:
> Consider the following example:
>
> @keyframes move {
> from, 49% { transform: none;}
> 50% { transform: translateX(10px); }
> to { transform: translateX(100px); }
> }
>
> <div style=“animation: move 10s”></div>
>
> When should the div become a CSS stacking context? At the start of the animation, or at the 49% keyframe?
>
> User agents generally agree on the latter[1], but I think it might make more sense to create stacking context at the start of the animation, if any of the animating property values create stacking context. This allows user agents to avoid having to recompute stacking in the middle of an animation in some cases.
>
> It’s temping to borrow spec language from will-change for this, but we again run into the question of whether keyframes that contain property values that are no-ops on the target element affect stacking (e.g. transforms on <span>).

I'm inclined to say that we just apply the property values literally -
you get a stacking context between 49% and 100% only.  If you want a
stacking context the whole time, set `will-change` appropriately.

~TJ
Received on Monday, 28 September 2015 23:27:58 UTC

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