summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/filter-effects/backdrop-filter-svg.html
blob: 01771ed56386c08c7c9c719d0417bd7ba897d6b9 (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
27
28
29
30
31
32
33
34
35
36
37
<!DOCTYPE html>
<meta charset="utf-8">
<title>backdrop-filter: Correctly apply backdrop-filter with an SVG filter</title>
<link rel="help" href="https://drafts.fxtf.org/filter-effects-2/#BackdropFilterProperty">
<link rel="match"  href="reference/backdrop-filter-svg-ref.html">

<div class="fuchsiabox"></div>
<div class="filter"></div>

<svg>
  <filter id="invert" color-interpolation-filters="sRGB">
    <feComponentTransfer>
        <feFuncR type="table" tableValues="1 0"/>
        <feFuncG type="table" tableValues="1 0"/>
        <feFuncB type="table" tableValues="1 0"/>
    </feComponentTransfer>
  </filter>
</svg>

<style>
.fuchsiabox {
  position: absolute;
  background: fuchsia;
  width: 100px;
  height: 100px;
  top: 100px;
  left: 60px;
}
.filter {
  position: absolute;
  width: 100px;
  height: 100px;
  top: 100px;
  left: 60px;
  backdrop-filter: url(#invert);
}
</style>