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

Re: Proposal: will-animate property

From: Ali Juma <ajuma@chromium.org>
Date: Tue, 3 Dec 2013 20:06:19 -0500
Message-ID: <CANLC6v2zAKEnVACU9VSPnqcJy0-G5J01Ac6_RxNr3CcUn6-5UA@mail.gmail.com>
To: Alan Gresley <alan@css-class.com>
Cc: "Robert O'Callahan" <robert@ocallahan.org>, "L. David Baron" <dbaron@dbaron.org>, Benoit Girard <bgirard@mozilla.com>, Matt Woodrow <matt@mozilla.com>, Cameron McCormack <cmccormack@mozilla.com>, www-style <www-style@w3.org>, "Tab Atkins Jr." <jackalmage@gmail.com>
On Tue, Dec 3, 2013 at 7:35 PM, Alan Gresley <alan@css-class.com> wrote:

> On 4/12/2013 9:06 AM, Ali Juma wrote:
>  To see why it would helpful for some will-animate values other than "auto"
>> to not create a stacking context, consider the following example:
>> http://jsfiddle.net/6rUyf/
> Agree.
>  There's a list of items and a pop-up menu attached to one of them (more
>> generally, there might be pop-ups associated with each item). Say the
>> author would like be able to animate the items' positions, and also wants
>> the pop-up to move with its parent item and stay above the other items. In
>> this case, transform animations cannot be used, since applying transforms
>> to the items will turn them into stacking contexts, causing the pop-up to
>> pop underneath other items.
> I don't understand. You already have established a stacking context by
> using position:relative for each item. This will cause problems to begin
> with. It needs to be placed on the list itself. Please examine the below
> code.

Not quite; since the items still have z-index 'auto', position:relative
doesn't make each item a stacking context, it just makes the item be the
containing block for the position:absolute popup. With your suggested
changes, applying a transform to an item will still cause the popup to pop
under the other items (since applying a transform makes the item a stacking
Received on Wednesday, 4 December 2013 01:06:50 UTC

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