summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-contain/contain-paint-dynamic-004-ref.html
blob: 02f3d94ee937b7429584f28826827c4b6b722dd6 (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
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<title>Dynamic change to paint containment (reference)</title>

<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />

<style>
  div {
      font: 25px/1 Ahem;
  }
  #wrapper {
      width: 15em;
      background: lightgray;
  }
  .containment {
      contain: paint;
  }
  .float {
      box-sizing: border-box;
      border: 1px solid black;
  }
  .left {
      float: left;
      width: 1em;
      height: 2em;
  }
  .right {
      float: right;
      width: 1em;
      height: 3em;
  }
</style>

<body>
  <p>PASS if the boxes with dark colors are NOT floating next to the boxes with
    light colors.</p>
  <div id="wrapper">
    <div>
      <div id="container" class="containment">
        <div><div class="float left" style="background: lightblue"></div></div>
        <div class="float right" style="background: lightyellow"></div>
        <div>XX XXX XXXX X</div>
      </div>
      <div class="float left" style="background: blue"></div>
      <div>
        <div>
          <div><div class="float right" style="background: yellow"></div></div>
          <div>XXX XXXXXX XXXX XX XX</div>
        </div>
        <div>XXXX XXXXX XX</div>
      </div>
      <div>XXX XXX XX XXXX</div>
    </div>
  </div>
</body>
</html>