summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-flexbox/flexbox-items-as-stacking-contexts-001-ref.xhtml
blob: 7e02b799f0f75b5d238ecc3c7bbaf87a53572e88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<?xml version="1.0" encoding="UTF-8"?>
<!--
     Any copyright is dedicated to the Public Domain.
     http://creativecommons.org/publicdomain/zero/1.0/
-->
<!-- Reference case, with floated elements in place of flex items, and using
     "position: relative" on those elements, to make z-index work on them
     outside of a flex container. -->
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <title>CSS Reftest Reference</title>
    <link rel="author" title="Daniel Holbert" href="mailto:dholbert@mozilla.com"/>
    <style>
      .flexbox {
        width: 90px;
        height: 10px;
        border: 2px solid gray;
        margin-bottom: 10px;
      }
      .a {
        width: 10px;
        height: 10px;
        background: lightblue;
        min-width: 0;
        float: left;
      }
      .b {
        width: 10px;
        height: 10px;
        background: pink;
        min-width: 0;
        margin-right: 10px;
        float: left;
      }
      .aKid {
         margin-left: 3px;
         margin-top:  3px;
         width: 10px;
         height: 10px;
         background: steelblue;
         border: 1px solid blue;
      }
      .bKid {
         margin-left: 3px;
         margin-top:  6px;
         width: 10px;
         height: 10px;
         background: violet;
         border: 1px solid purple;
      }

      .z0, .z1, .zn1 { position: relative; }
      .z0  { z-index:  0; }
      .z1  { z-index:  1; }
      .zn1 { z-index: -1; }

    </style>
  </head>
 <body>
   <!-- No "z-index" -->
    <div class="flexbox">
      <div class="a"><div class="aKid"/></div>
      <div class="b"><div class="bKid"/></div>
    </div>

    <!-- Various "z-index" just on the first item -->
    <div class="flexbox">
      <div class="a zn1"><div class="aKid"/></div>
      <div class="b"><div class="bKid"/></div>

      <div class="a z0"><div class="aKid"/></div>
      <div class="b"><div class="bKid"/></div>

      <div class="a z1"><div class="aKid"/></div>
      <div class="b"><div class="bKid"/></div>
    </div>

    <!-- Various "z-index" just on the second item -->
    <div class="flexbox">
      <div class="a"><div class="aKid"/></div>
      <div class="b zn1"><div class="bKid"/></div>

      <div class="a"><div class="aKid"/></div>
      <div class="b z0"><div class="bKid"/></div>

      <div class="a"><div class="aKid"/></div>
      <div class="b z1"><div class="bKid"/></div>
    </div>

    <!-- Various "z-index" on the first item, w/ "z-index:0" on second item -->
    <div class="flexbox">
      <div class="a zn1"><div class="aKid"/></div>
      <div class="b z0"><div class="bKid"/></div>

      <div class="a z0"><div class="aKid"/></div>
      <div class="b z0"><div class="bKid"/></div>

      <div class="a z1"><div class="aKid"/></div>
      <div class="b z0"><div class="bKid"/></div>
    </div>

    <!-- Various "z-index" on the second item, w/ "z-index:0" on first item -->
    <div class="flexbox">
      <div class="a z0"><div class="aKid"/></div>
      <div class="b zn1"><div class="bKid"/></div>

      <div class="a z0"><div class="aKid"/></div>
      <div class="b z0"><div class="bKid"/></div>

      <div class="a z0"><div class="aKid"/></div>
      <div class="b z1"><div class="bKid"/></div>
    </div>

  </body>
</html>