Debian Codegraph @

tests/visual/modifiers/flip/checkVariation-shorter.html

raw
1 <!DOCTYPE html> <title>Basic Visual Test</title>
2
3 <style>
4 @import '/reset.css';
5 html,
6 body {
7 height: 1500px;
8 }
9
10 #reference {
11 position: absolute;
12 top: 550px;
13 left: 60px;
14 width: 200px;
15 height: 200px;
16 background-color: red;
17 box-shadow: inset 0 0 0 1px black;
18 }
19
20 #popper {
21 width: 300px;
22 height: 100px;
23 background-color: rebeccapurple;
24 box-shadow: inset 0 0 0 1px black;
25 }
26 </style>
27
28 <div id="reference">Reference Box</div>
29 <div id="popper">Popper Box</div>
30
31 <script type="module">
32 import { createPopper } from '../../dist/popper.js';
33 const reference = document.querySelector('#reference');
34 const popper = document.querySelector('#popper');
35
36 window.instance = createPopper(reference, popper, {
37 placement: 'right-start',
38 modifiers: [
39 {
40 name: 'preventOverflow',
41 options: {
42 rootBoundary: 'document',
43 },
44 },
45 ],
46 });
47 </script>