Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-transforms/transform-translate-background-002.html - WPT Dashboard Interop Dashboard
<!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="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>