Re: Proposal: will-animate property

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
context).

Received on Wednesday, 4 December 2013 01:06:50 UTC