Debian Codegraph @

tests/visual/modifiers/flip/checkVariation.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: 150px;
13 left: 50px;
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: 500px;
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: 'top-end',
38 modifiers: [
39 {
40 name: 'flip',
41 options: {
42 fallbackPlacements: [
43 'top-start',
44 'right-start',
45 'right-end',
46 'bottom-end',
47 'bottom-start',
48 ],
49 },
50 },
51 ],
52 });
53 </script>