W3C home > Mailing lists > Public > www-style@w3.org > July 2012

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

From: fantasai <fantasai.lists@inkedblade.net>
Date: Mon, 23 Jul 2012 19:05:04 -0700
Message-ID: <500E02D0.3050206@inkedblade.net>
To: www-style@w3.org
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. :)

~fantasai
Received on Tuesday, 24 July 2012 02:05:35 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:57 GMT