summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/filter-effects/backdrop-filter-containing-block.html
blob: 364405c72d62ce757f8acb1195937f8e9b47a875 (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: Forms a containing block for fixed/absolute</title>
<link rel="author" href="mailto:masonf@chromium.org">
<link rel="help" href="https://drafts.fxtf.org/filter-effects-2/#BackdropFilterProperty">
<link rel="match"  href="backdrop-filter-containing-block-ref.html">

<p>Expected: one green square and one red square, both 200px by 200px.</p>
<div class="container">
  <div class="fixed-child"></div>
  <div class="absolute-child"></div>
</div>

<style>
.container {
  width: 200px;
  backdrop-filter: invert(1);
}

.fixed-child {
  position: fixed;
  top: 0;
  background-color: green;
  width: 100%;
  height: 200px;
}

.absolute-child {
  position: absolute;
  top: 0;
  left: 210px;
  background-color: red;
  width: 100%;
  height: 200px;
}
</style>