summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-masking/clip/clip-fixed-pos-transform-descendant-001.html
blob: 395b0bc96456080f4216cf4fd556ddfef1fd3e75 (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>CSS Masking: Transformed descendants of a fixed pos element under a clipped element get properly clipped</title>
<link rel="author" title="Emilio Cobos Álvarez" href="mailto:emilio@crisal.io">
<link rel="author" title="Mozilla" href="https://mozilla.org">
<link rel="match" href="clip-fixed-pos-transform-descendant-001-ref.html">
<link rel="help" href="https://drafts.fxtf.org/css-masking/#clip-property">
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1495791">
<style>
html, body { margin: 0; }

#clip {
  height: 100px;
  width: 100px;
  background: lime;
  clip: rect(0, auto, auto, 0);
  position: absolute;
}

#fixed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100px;
  height: 100px;
}

#clipped {
  height: 100px;
  width: 100px;
  background: red;
  transform: translateY(100px);
}
</style>
<div id="clip">
  <div id="fixed">
    <div id="clipped"></div>
  </div>
</div>