summaryrefslogtreecommitdiffstats
path: root/layout/reftests/css-transitions/reframe-and-transition-starts-at-the-same-time.html
blob: e3eee44886ecd4f5aec05c3766a9e2a71e4096d5 (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
<!DOCTYPE html>
<html class="reftest-wait">
<style>
#target::before {
  transition: background-color 100s steps(1, end);
  content: 'initial';
  background-color: rgb(255, 255, 255);
  height: 100px;
  width: 100px;
  position: absolute;
}
#target.hover::before{
  background-color: rgb(0, 0, 0);
  content: '';
}
</style>
<div id="target"></div>
<script>
window.addEventListener("load", () => {
  target.className = 'hover';
  target.addEventListener('transitionstart', () => {
    document.documentElement.classList.remove('reftest-wait');
  });
});
</script>
</html>