Re: [css3-positioning] z-index and pseudo-stacking contexts

On Jul 23, 2012, at 7:05 pm, fantasai <fantasai.lists@inkedblade.net> wrote:

> On 07/23/2012 06:52 PM, Simon Fraser wrote:
>> On Jul 23, 2012, at 5:56 PM, fantasai<fantasai.lists@inkedblade.net>  wrote:
>> 
>>> So I have two questions (non-rhetorical):
>>>  1. Is it desired / are there use cases for having positioned context
>>>     within a z-positioned element be able to escape the z-positioned
>>>     element's stacking context?
>> 
>> But then they participate with some other stacking context? What would
>> the rules be for depth sorting things across different stacking contexts?
> 
> They (all z-positioned descendants) would participate in the parent stacking
> context, just like they do when the element only forms a pseudo-stacking
> context.
> 
> The difference with a regular element would be that
>  - the element forms a pseudo-stacking context, if it doesn't already
>  - its pseudo-stacking context is given a z-index and participates in its
>    parent context accordingly
> 
> The difference from a positioned z-index-ed element would be that
>  - the element doesn't form a stacking context, it forms a pseudo-stacking
>    context at the specified level, so z-positioned descendants participate
>    in the parent context
> 
> Now that I think about it, you might need to specify something special for
> 'z-index: auto' positioned descendants so they stay with the element rather
> than layering with the parent's 'z-index: 0' items.
> 
> Anyway, the first question is, do we even need to consider this. :)

I'd say no, unless there's a very compelling use case.

Simon

Received on Tuesday, 24 July 2012 15:11:53 UTC