summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-overflow/overflow-hidden-resize-with-stacking-context-child.html
blob: 8569ac153329c96b5dd27f43fd549163380694e8 (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
39
40
41
42
<!doctype html>
<html class="reftest-wait">
<title>overflow:hidden changes size with stacking context child</title>
<link rel="help" href="https://drafts.csswg.org/css-overflow/#valdef-overflow-hidden">
<link rel="help" href="https://www.w3.org/TR/CSS22/zindex.html">
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
<script src="/common/rendering-utils.js"></script>
<script src="/common/reftest-wait.js"></script>
<style>
#container {
  overflow: hidden;
  width: 100px;
  height: 20px;
}
#stacking-context {
  position: relative;
  background: red;
  z-index: 100;
}
.content {
  width: 100px;
  height: 20px;
  background: green;
}
</style>
<p>Test passes if there is a filled green square.</p>
<div id="container">
  <div id="stacking-context">
    <div class="content"></div>
    <div class="content"></div>
    <div class="content"></div>
    <div class="content"></div>
    <div class="content"></div>
  </div>
</div>
<script>
waitForAtLeastOneFrame().then(() => {
  container.style.height = '100px';
  takeScreenshot();
});
</script>
</html>