wpt / css / css-color / animation / contrast-color-interpolation.html

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

/css/css-color/animation/contrast-color-interpolation.html

<!DOCTYPE html>
<title>CSS Color Test: Interpolate between contrast-color() and lime</title>
<link rel="help" href="https://drafts.csswg.org/css-color-5/#contrast-color">
<link rel="match" href="/css/reference/ref-filled-green-100px-square-only.html">
<style>
  #t {
    position: relative;
    left: -100px;
    width: 100px;
    height: 100px;
    animation: --anim 2000s steps(2, start) both;
  }
  @keyframes --anim {
    from {
      box-shadow: contrast-color(white) 100px 0px;
    }
    to {
      box-shadow: lime 100px 0px;
    }
  }
</style>
<p>Test passes if there is a filled green square.</p>
<div id="t"></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>