Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
            
- /css/css-animations/display-via-custom-prop-animation-crash.html - WPT Dashboard Interop Dashboard
 
 
<!DOCTYPE html>
<html class="test-wait">
<style>
  :root {
    --disp: block;
  }
  @keyframes switch {
    0% { --disp: none; }
    100% { --disp: block; }
  }
  #target {
    height: 100px;
    width: 100px;
    background-color: green;
    animation: switch 0.5s;
    display: var(--disp);
  }
</style>
<div id="target">
  <div></div>
</div>
<script>
  target.addEventListener("animationend", function() {
    document.documentElement.classList = "";
  })
  target.getBoundingClientRect();
</script>