testing/web-platform/tests/css/css-values/calc-positive-fraction-001.html
author Serban Stanca <sstanca@mozilla.com>
Mon, 14 Jul 2025 00:37:50 +0300 (2 hours ago)
changeset 796395 57c30f1adca5fb5ccd4a9a09192c41e207e28d88
parent 606595 895e9f55c489ee2cc6e5bb3b1039f863e5b72809
permissions -rw-r--r--
Revert "Bug 1950748 part 3: Don't return a caret inside an editor when no editor is focused. r=morgan" as requested for causing accessibility crashes (bug 1977012). This reverts commit aaf970807d281c28c1e937491719d996cb11648a. This reverts commit f5f2e3cf4d34c2430372ba790d77620837d56b75. This reverts commit 5565c5899c32c0b0f5446561a21c5b6499fd44c6.
<!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>