<!DOCTYPE HTML>
<title>CSS Test (Transforms): Filter on a 3d transformed element</title>
<link rel="author" title="L. David Baron" href="https://dbaron.org/">
<link rel="author" title="Google" href="http://www.google.com/">
<link rel="help" href="http://www.w3.org/TR/css-transforms-2/#3d-transform-rendering">
<link rel="help" href="https://drafts.fxtf.org/filter-effects/#FilterProperty">
<meta name="assert" content="The filtered element is rendered correctly without clipping, despite the interesting transform.">
<link rel="match" href="3dtransform-and-filter-no-perspective-001-ref.html">

<style>

body {
  margin: 0;
}

div {
  height: 500px;
  width: 750px;
  overflow: hidden;
  position: relative;
}

span {
  background: blue;
  display: inline-block;
  top: 0;
  left: 200px;
  position: absolute;
  width: 293px;
  height: 174px;
  transform-origin: 0px -400px 0px;
  margin-top: 300px;
  transform: rotateZ(-20deg) rotateX(55deg);
  filter: drop-shadow(0px 60px 40px rgba(0,0,0,0));
}

svg.cover {
  position: absolute;
  z-index: 1;
  top: 0;
  left: 0;
  width: 600px;
  height: 220px;
}

/*

The device-to-local transform here is:
left              margin-top        transform-origin   transform                      -transform-origin
translateX(200px) translateY(300px) translateY(-400px) rotateZ(-20deg) rotateX(55deg) translateY(400px)
which is equivalent to:
matrix3d(0.939693, -0.34202, 0, 0, 0.196175, 0.538986, 0.819152, 0, -0.280166, -0.769751, 0.573576, 0, 278.47, 115.594, 327.661, 1)

*/

</style>

<div>
  <span></span>
</div>

<!-- cover the blurred edge so we can match to a reference -->
<svg class="cover">
  <polygon fill="transparent" stroke="aqua" stroke-width="4"
           points="278.470,115.594
                   553.80005,15.38214
                   587.9345,109.1657
                   312.6045,209.3776" />
</svg>
