W3C home > Mailing lists > Public > www-style@w3.org > April 2011

Re: Transforms and z-index (Was: [CSSWG] Minutes and Resolutions 2011-04-20)

From: Simon Fraser <smfr@me.com>
Date: Thu, 21 Apr 2011 22:16:40 -0700
Cc: www-style list <www-style@w3.org>
Message-id: <BC01E14C-A02B-43B5-8FE0-168E5E050820@me.com>
To: Philippe Wittenbergh <ph.wittenbergh@l-c-n.com>
On Apr 21, 2011, at 8:28 PM, Philippe Wittenbergh wrote:

> On Apr 22, 2011, at 12:05 PM, Simon Fraser wrote:
> 
>>> RESOLVED: transforms create a pseudo-stacking context, not a full one.
>>>          z-index doesn't apply.
>> 
>> I realized that was forgetting part of the story here.
>> 
>> A transformed element acts as a stacking context  (like one with opacity). But
>> it also acts as a positioning container for its descendants, so, for example, a
>> position:relative child's left and top are relative to its transformed ancestor in
>> that case, again as if the transformed element itself has position:relative.
>> 
>> I don't think this changes the fact that z-index should not apply to a transformed
>> element (just as 'left' and 'top' do not apply), but I wanted to mention it in case
>> someone disagrees.
> 
> I was going to note that  (with an absolute pos. child of a transform). But you confuse me. In all UA I've tested (Gecko 1.9.2+, Webkit nightly, Opera 11.10), 'left' and 'top' are applied to the AP child of a transform.

I think you misunderstand. Those still work. I'm saying that 'left' and 'top'
don't apply to a statically positioned, transformed element.

Simon
Received on Friday, 22 April 2011 05:18:06 GMT

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