summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/top-layer-parent-overflow-clip.html
blob: d80595496929d0352a874a2dfb825098af7ecd91 (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
<!DOCTYPE html>
<html>
<title>Test that parent overflow: clip; does not affect top layer elements</title>
<meta charset="utf-8">
<link rel="author" title="Tim Nguyen" href="https://github.com/nt1m">
<link rel="match" href="green-dialog-and-backdrop.html">
<link rel="help" href="https://fullscreen.spec.whatwg.org/#new-stacking-layer">
<style>
body { background: red; }

#parent {
    max-width: 0;
    max-height: 0;
    width: 0;
    height: 0;
    overflow: clip;
    position: absolute;
}

dialog::backdrop,
dialog {
    background: green;
    position: absolute;
    outline: none;
}
</style>
<body>
<div id="parent">
    <dialog>PASS if no red shows</dialog>
</div>
<script>
    document.querySelector("dialog").showModal();
</script>
</body>
</html>