summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/filter-effects/backdrop-filter-svg-foreignObject.html
blob: 4ccaa0cf81ff6c9787ad02c53cf6a1d19857dace (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
38
<!DOCTYPE html>
<title>backdrop-filter: on SVG foreignObject</title>
<link rel="help" href="https://drafts.fxtf.org/filter-effects-2/#BackdropFilterProperty">
<link rel="match"  href="backdrop-filter-basic-ref.html">

<div>
  <p>Expected: A green box and an overlapping black box, with a magenta<br>
  overlapping region.</p>
</div>
<div class="colorbox">
  <svg>
    <foreignObject class="filterbox"></foreignObject>
  </svg>
</div>

<style>
.colorbox {
    position: absolute;
    background: green;
    width: 100px;
    height: 100px;
    left: 10px;
    top: 100px;
}
svg {
    position: absolute;
    width: 200px;
    height: 200px;
    left: 50px;
    top: 50px;
}
.filterbox {
    width: 100px;
    height: 100px;
    backdrop-filter: invert(1);
}
</style>