summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/html/semantics/interactive-elements/the-dialog-element/backdrop-in-flow.html
blob: 06f790979eb8118a52ffa0f0481a64d1686f46f0 (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
<!DOCTYPE html>
<link rel="match" href="backdrop-in-flow-ref.html">
<link rel="help" href="https://fullscreen.spec.whatwg.org/#new-stacking-layer">
<style>
dialog {
    visibility: hidden;
}

dialog::backdrop {
    visibility: visible;
    height: 100px;
    width: 50px;
}

#left::backdrop {
    position: static;
    top: 100px;
    left: 100px;
    background: green;
}

#right::backdrop {
    position: relative;
    background: green;
    top: 100px;
    left: 150px;
}
</style>
<body>
Test that position 'static' or 'relative' for ::backdrop computes to 'absolute'.
The test passes if there is a single green box.
<dialog id="left"></dialog>
<dialog id="right"></dialog>
</div>
<script>
document.querySelector('#left').showModal();
document.querySelector('#right').showModal();
</script>
</body>