W3C home > Mailing lists > Public > www-style@w3.org > January 2008

Re: CSS2.1: computed value of z-index

From: David Hyatt <hyatt@apple.com>
Date: Wed, 02 Jan 2008 16:41:52 -0600
To: robert@ocallahan.org
Cc: Maciej Stachowiak <mjs@apple.com>, www-style@w3.org
Message-id: <EDA1984F-165E-45A0-9A14-81C4EEE5DF30@apple.com>


On Jan 2, 2008, at 4:31 PM, Robert O'Callahan wrote:

>
> Why don't we just make z-index applicable to everything, with a non- 
> auto z-index inducing a stacking context? That would be really easy  
> for us to implement. Right now we actually have to have code to  
> explicitly disable z-index for non-positioned elements.


I do not believe we can do this as it would introduce major  
compatibility issues.  Many sites specify z-index on objects where it  
does not apply, and if we suddenly honored it, the sites would break.   
I know this from fixing bugs where we used to apply z-index  
incorrectly to unpositioned elements.  They do this even in strict mode.

I think z-index should be honored for an object that introduces a  
stacking context (this would include opacity and positioned elements  
in CSS3 so far) and should be considered auto otherwise.  Note that  
WebKit is the only engine (I believe) that respects z-index on  
elements with opacity < 1.  It's ambiguous right now (IMO) whether or  
not WebKit is correct, but I think the behavior makes sense.

dave
Received on Wednesday, 2 January 2008 22:42:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:57 GMT