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

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

From: Bjoern Hoehrmann <derhoermi@gmx.net>
Date: Wed, 02 Jan 2008 23:51:12 +0100
To: Maciej Stachowiak <mjs@apple.com>
Cc: www-style@w3.org
Message-ID: <fl4on3dgmutsvb1e7n8el6672ili4hvf52@hive.bjoern.hoehrmann.de>

* Maciej Stachowiak wrote:
>z-index only applies to positioned elements, however, its computed  
>value is "as specified". Since the computed value can be exposed to  
>script via getComputedStyle(), I suggest that it would be more useful  
>if the computed value is "as specified for positioned elements,  
>otherwise auto" so that scripts get the value actually used.

Could you elaborate on your reasoning here? If the property does not
apply, you do not use some specific value, you use no value at all.
Further, we do not have such magical behavior for other properties,
e.g. page-break-after applies only to block-level elements and the
computed value is also "as specified", not "auto". It's also hard to
see where you'd specifiy the property for an element it does not
apply to, then query the computed value, and gain something from
getting "auto" instead of what has been specified. I also note that
this may change behavior for pages that use z-index:inherit, or that
do whatever you have in mind and deal with getting something but
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 
Received on Wednesday, 2 January 2008 22:51:28 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:27:32 UTC