Issue metadata
Sign in to add a comment
|
Contain layout causes a new stacking context breaking z-index
Reported by
tuhoojab...@gmail.com,
Dec 10
|
||||||||||||||||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.80 Safari/537.36 Steps to reproduce the problem: 1. Create 3 elements, two with position relative and a third one as a child of the first one with position absolute 2. Use z-index to make sure the third element is not occluded by the second element 3. Add contain: layout to the first element 4. The third element is now occluded by the second element (as if it had no z-index) Reproduction: https://jsfiddle.net/7Lfj08qt/1/ What is the expected behavior? Works in Firefox and older Chrome versions: http://browsershots.org/https://jsfiddle.net/7Lfj08qt/1/embedded/result/ What went wrong? Seems like contain: layout creates a new stacking context causing the z-index to stop working. Did this work before? Yes 70 Does this work in other browsers? Yes Chrome version: 71.0.3578.80 Channel: stable OS Version: OS X 10.14.2 Flash Version: - According to https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Positioning/Understanding_z_index/The_stacking_context contain: layout is supposed to create a new stacking context so perhaps this is the way it should be based on the spec and other browsers haven't fixed/implemented it yet.
,
Dec 10
,
Dec 10
This is indeed the intended behavior. Thanks for the follow up. |
|||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||
Comment 1 by tuhoojab...@gmail.com
, Dec 10