Last Comment Bug 647494 - z-index changes behaviour with CSS tranform
: z-index changes behaviour with CSS tranform
Product: Core
Classification: Components
Component: General (show other bugs)
: unspecified
: x86 Windows XP
-- normal with 1 vote (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
Depends on:
  Show dependency treegraph
Reported: 2011-04-02 17:08 PDT by Zéfling
Modified: 2016-06-08 12:53 PDT (History)
4 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---

z-index with transform (703 bytes, text/html)
2011-04-02 17:09 PDT, Zéfling
no flags Details
z-index without transform (548 bytes, text/html)
2011-04-02 17:10 PDT, Zéfling
no flags Details

Description User image Zéfling 2011-04-02 17:08:52 PDT
User-Agent:       Mozilla/5.0 (Windows NT 5.2; WOW64; rv:2.2a1pre) Gecko/20110402 Firefox/4.2a1pre
Build Identifier: 

I presume that the ancient behaviour was okay. See following test:

Reproducible: Always
Comment 1 User image Zéfling 2011-04-02 17:09:57 PDT
Created attachment 523831 [details]
z-index with transform
Comment 2 User image Zéfling 2011-04-02 17:10:23 PDT
Created attachment 523832 [details]
z-index without transform
Comment 3 User image Boris Zbarsky [:bz] (still a bit busy) 2011-04-02 20:50:01 PDT says:

  Any value other than ‘none’ for the transform results in the creation of both a
  stacking context and a containing block.

so the behavior you see is correct as far as I can tell.
Comment 4 User image Boris Zbarsky [:bz] (still a bit busy) 2011-04-02 20:50:25 PDT
Er, wrong resolution.
Comment 5 User image Zéfling 2011-04-03 01:30:28 PDT
Okay, the behavior of Presto is similar, but Gecko 1.9.x et Webkit are a behavior different.
It is strange to see like that with floating ojects.
Comment 6 User image Zéfling 2011-04-03 01:48:19 PDT
Oups, sorry, it's only with Webkit.
Comment 7 User image Boris Zbarsky [:bz] (still a bit busy) 2011-04-03 13:44:03 PDT
I filed
Comment 8 User image Robert O'Callahan (:roc) (email my personal email if necessary) 2011-04-06 09:52:11 PDT
I think that creating a stacking context is not enough for z-index to apply. For example, z-index does not apply to an element with opacity:0.5 but position:static.
Comment 9 User image Boris Zbarsky [:bz] (still a bit busy) 2011-04-06 10:14:47 PDT
OK.  Note that Opera, IE9, and we all apply z-index to transformed content (presumably because the spec says it needs to act like position:relative).

I guess we should see where the discussion on www-style ends up.

Note You need to log in before you can comment on or make changes to this bug.