Wed, 31 Dec 2014 07:22:50 +0100
Correct previous dual key logic pending first delivery installment.
michael@0 | 1 | <!DOCTYPE html> |
michael@0 | 2 | <!-- |
michael@0 | 3 | Any copyright is dedicated to the Public Domain. |
michael@0 | 4 | http://creativecommons.org/publicdomain/zero/1.0/ |
michael@0 | 5 | --> |
michael@0 | 6 | <!-- This testcase checks that flex items are painted as pseudo-stacking |
michael@0 | 7 | contexts, instead of full stacking contexts. In other words, content |
michael@0 | 8 | inside of one flex item should be able to iterleave between pieces of |
michael@0 | 9 | content in another flex item, if we set appropriately interleaving |
michael@0 | 10 | "z-index" values. --> |
michael@0 | 11 | <!-- This was resolved by the CSSWG in April 2013: |
michael@0 | 12 | http://krijnhoetmer.nl/irc-logs/css/20130403#l-455 --> |
michael@0 | 13 | <html> |
michael@0 | 14 | <head> |
michael@0 | 15 | <title>CSS Test: Testing that flex items paint as pseudo-stacking contexts (like inline-blocks), instead of full stacking contexts: 'z-index' should let descendants interleave</title> |
michael@0 | 16 | <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"> |
michael@0 | 17 | <link rel="help" href="http://www.w3.org/TR/css3-flexbox/#painting"> |
michael@0 | 18 | <link rel="match" href="flexbox-items-as-stacking-contexts-3-ref.html"> |
michael@0 | 19 | <style> |
michael@0 | 20 | .flexContainer { |
michael@0 | 21 | background: orange; |
michael@0 | 22 | display: flex; |
michael@0 | 23 | justify-content: space-between; |
michael@0 | 24 | width: 70px; |
michael@0 | 25 | height: 20px; |
michael@0 | 26 | padding: 2px; |
michael@0 | 27 | margin-bottom: 2px; |
michael@0 | 28 | } |
michael@0 | 29 | .item1 { |
michael@0 | 30 | background: lightblue; |
michael@0 | 31 | width: 30px; |
michael@0 | 32 | padding: 2px; |
michael@0 | 33 | } |
michael@0 | 34 | .item2 { |
michael@0 | 35 | background: yellow; |
michael@0 | 36 | width: 30px; |
michael@0 | 37 | padding: 2px; |
michael@0 | 38 | } |
michael@0 | 39 | .grandchildA { |
michael@0 | 40 | background: purple; |
michael@0 | 41 | width: 80px; |
michael@0 | 42 | height: 6px; |
michael@0 | 43 | position: relative; |
michael@0 | 44 | z-index: 10; |
michael@0 | 45 | } |
michael@0 | 46 | .grandchildB { |
michael@0 | 47 | background: teal; |
michael@0 | 48 | width: 80px; |
michael@0 | 49 | height: 6px; |
michael@0 | 50 | position: relative; |
michael@0 | 51 | z-index: 20; |
michael@0 | 52 | } |
michael@0 | 53 | .grandchildC { |
michael@0 | 54 | background: lime; |
michael@0 | 55 | width: 20px; |
michael@0 | 56 | height: 16px; |
michael@0 | 57 | position: relative; |
michael@0 | 58 | /* This z-index should interleave this content |
michael@0 | 59 | between grandchildA and grandchildB: */ |
michael@0 | 60 | z-index: 15; |
michael@0 | 61 | } |
michael@0 | 62 | </style> |
michael@0 | 63 | </head> |
michael@0 | 64 | <body> |
michael@0 | 65 | <!-- This flex container's first flex item has content that overflows |
michael@0 | 66 | and overlap the second flex item. The z-index values are set such |
michael@0 | 67 | that this content should interleave; grandchildC should |
michael@0 | 68 | paint on top of grandchildA, but underneath grandchildB. --> |
michael@0 | 69 | <div class="flexContainer" |
michael@0 | 70 | ><div class="item1" |
michael@0 | 71 | ><div class="grandchildA"></div |
michael@0 | 72 | ><div class="grandchildB"></div |
michael@0 | 73 | ></div |
michael@0 | 74 | ><div class="item2" |
michael@0 | 75 | ><div class="grandchildC"></div |
michael@0 | 76 | ></div |
michael@0 | 77 | ></div> |
michael@0 | 78 | </body> |
michael@0 | 79 | </html> |