summaryrefslogtreecommitdiffstats
path: root/layout/reftests/display-list/retained-dl-style-change-with-prerender-transform-1.html
blob: c6c31bdf5c142d2fb9d69ed7c7859c92436bba40 (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
<!DOCTYPE html>
<html class="reftest-wait">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<style>
.wrapper {
  width: 810vw;
  transform: translateX(-50%);
  height: 90vh;
}
.slides {
  will-change: transform;
}
.button {
  background-color: red;
  position: absolute;
  left: 50%;
}
</style>
<div class="wrapper">
  <div class="slides">
    <span class="button">Add to cart</span>
  </div>
</div>
<script>
document.addEventListener("MozReftestInvalidate", () => {
  document.querySelector(".button").style.backgroundColor = "green";
  document.documentElement.classList.remove("reftest-wait");
}, { once: true });
</script>
</html>