wpt / css / css-transforms / scale-animation-with-var-001.html

Status: PASS | Duration: 7ms | Subtests: 1/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi

/css/css-transforms/scale-animation-with-var-001.html

<!DOCTYPE HTML>
<!-- this is functionally a crashtest, but I'm including a reference too -->
<link rel="help" href="https://issues.chromium.org/issues/375798131">
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">

<style>

@keyframes k {
  to {
    scale: var(--scale-to);
  }
}

#target {
  --percentage: 3;
  --scale-to: calc(var(--percentage));

  animation: k linear 2s -1s paused;
  width: 50px;
  height: 50px;
  background: green;
  transform-origin: top left;
}

</style>

<p>Test passes if there is a filled green square.</p>

<div id="target"></div>

/css/reference/ref-filled-green-100px-square-only.html

<!DOCTYPE html>
<link rel="author" title="Morten Stenshorne" href="mstensho@chromium.org">
<p>Test passes if there is a filled green square.</p>
<div style="width:100px; height:100px; background:green;"></div>