summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-transforms/transform-translate-background-002.html
blob: 9551ec51ad122ecdc6c9bf1d13d9b56742b24c50 (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
<!DOCTYPE html>
<html class="reftest-wait">
<meta charset="utf-8">
<title>CSS Transforms: Dynamically translate gradient background on root element</title>
<link rel="author" title="Manuel Rego Casasnovas" href="mailto:rego@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-transforms/#transform-rendering">
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=988446">
<link rel="match" href="transform-translate-background-001-ref.html">
<meta name="assert" content="Checks that the linear gradient is not modified when you dynamically translate the root element. The test passes if you see only green.">
<script src="/common/reftest-wait.js"></script>
<style>
  html {
    background: linear-gradient(to bottom, green 0%, green 50%, red 50%, red 100%);
    overflow: hidden;
  }
</style>
<div style="height: 400vh;"></div>
<script>
  requestAnimationFrame(() => requestAnimationFrame(() => {
    document.documentElement.style.transform = "translate(0, -250vh)";
    takeScreenshot();
  }));
</script>
</html>