layout/reftests/w3c-css/submitted/flexbox/flexbox-items-as-stacking-contexts-3.html

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/layout/reftests/w3c-css/submitted/flexbox/flexbox-items-as-stacking-contexts-3.html	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,79 @@
     1.4 +<!DOCTYPE html>
     1.5 +<!--
     1.6 +     Any copyright is dedicated to the Public Domain.
     1.7 +     http://creativecommons.org/publicdomain/zero/1.0/
     1.8 +-->
     1.9 +<!-- This testcase checks that flex items are painted as pseudo-stacking
    1.10 +     contexts, instead of full stacking contexts. In other words, content
    1.11 +     inside of one flex item should be able to iterleave between pieces of
    1.12 +     content in another flex item, if we set appropriately interleaving
    1.13 +     "z-index" values. -->
    1.14 +<!-- This was resolved by the CSSWG in April 2013:
    1.15 +     http://krijnhoetmer.nl/irc-logs/css/20130403#l-455 -->
    1.16 +<html>
    1.17 +<head>
    1.18 +  <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>
    1.19 +  <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com">
    1.20 +  <link rel="help" href="http://www.w3.org/TR/css3-flexbox/#painting">
    1.21 +  <link rel="match" href="flexbox-items-as-stacking-contexts-3-ref.html">
    1.22 +  <style>
    1.23 +    .flexContainer {
    1.24 +      background: orange;
    1.25 +      display: flex;
    1.26 +      justify-content: space-between;
    1.27 +      width: 70px;
    1.28 +      height: 20px;
    1.29 +      padding: 2px;
    1.30 +      margin-bottom: 2px;
    1.31 +    }
    1.32 +    .item1 {
    1.33 +      background: lightblue;
    1.34 +      width: 30px;
    1.35 +      padding: 2px;
    1.36 +    }
    1.37 +    .item2 {
    1.38 +      background: yellow;
    1.39 +      width: 30px;
    1.40 +      padding: 2px;
    1.41 +    }
    1.42 +    .grandchildA {
    1.43 +      background: purple;
    1.44 +      width: 80px;
    1.45 +      height: 6px;
    1.46 +      position: relative;
    1.47 +      z-index: 10;
    1.48 +    }
    1.49 +    .grandchildB {
    1.50 +      background: teal;
    1.51 +      width: 80px;
    1.52 +      height: 6px;
    1.53 +      position: relative;
    1.54 +      z-index: 20;
    1.55 +    }
    1.56 +    .grandchildC {
    1.57 +      background: lime;
    1.58 +      width: 20px;
    1.59 +      height: 16px;
    1.60 +      position: relative;
    1.61 +      /* This z-index should interleave this content
    1.62 +         between grandchildA and grandchildB: */
    1.63 +      z-index: 15;
    1.64 +    }
    1.65 +  </style>
    1.66 +</head>
    1.67 +<body>
    1.68 +  <!-- This flex container's first flex item has content that overflows
    1.69 +       and overlap the second flex item.  The z-index values are set such
    1.70 +       that this content should interleave; grandchildC should
    1.71 +       paint on top of grandchildA, but underneath grandchildB. -->
    1.72 +  <div class="flexContainer"
    1.73 +    ><div class="item1"
    1.74 +      ><div class="grandchildA"></div
    1.75 +      ><div class="grandchildB"></div
    1.76 +    ></div
    1.77 +    ><div class="item2"
    1.78 +      ><div class="grandchildC"></div
    1.79 +    ></div
    1.80 +  ></div>
    1.81 +</body>
    1.82 +</html>

mercurial