summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-values/calc-positive-fraction-001.html
blob: 89d1798a7be18e4bab3504bb37cb0a55d7f44d34 (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
<!DOCTYPE html>

  <meta charset="UTF-8">

  <title>CSS Test: calc() with positive fraction halfway between adjacent integers</title>

  <link rel="author" title="Gérard Talbot" href="http://www.gtalbot.org/BrowserBugsSection/css21testsuite/">
  <link rel="help" href="https://www.w3.org/TR/css-values-4/#combine-integers">
  <link rel="match" href="../reference/ref-filled-green-100px-square.xht">

  <style>
  div
    {
      height: 100px;
      position: absolute;
      width: 100px;
    }

  div#red-overlapped
    {
      background-color: red;
      z-index: 2;
    }

  div#green-overlapping
    {
      background-color: green;
      z-index: calc(3 / 2);
      /*
      should resolve to 'z-index: 2' since "values
      halfway between adjacent integers rounded
      towards positive infinity" and since
      div#green-overlapping is last in document
      tree order, then it should overlap
      div#red-overlapped
      */
    }
  </style>

  <p>Test passes if there is a filled green square and <strong>no red</strong>.

  <div id="red-overlapped"></div>

  <div id="green-overlapping"></div>