Bug 1686484 [wpt PR 27157] - [css-scroll-snap] Check for correct handling of margins...
[gecko.git] / testing / web-platform / tests / css / css-scroll-snap / snap-after-initial-layout / writing-mode-vertical-rl.html
blob1710bc16ddf6a95ff66e3305e1b591a130855a81
1 <!DOCTYPE html>
2 <title>
3 Scrollers should snap to the closest snap point on initial layout
4 (using 'writing-mode: vertical-rl')
5 </title>
6 <link rel="help" href="https://drafts.csswg.org/css-scroll-snap/#re-snap" />
7 <link rel="match" href="snap-after-initial-layout-ref.html" />
8 <style>
9 div {
10 position: absolute;
11 margin: 0;
14 #scroller {
15 /* Chrome bug using 'position:absolute' with LayoutNG disabled */
16 position: relative;
18 height: 500px;
19 width: 500px;
20 overflow: hidden;
21 scroll-snap-type: both mandatory;
22 writing-mode: vertical-rl;
25 #close-target {
26 width: 200px;
27 height: 200px;
28 border: solid green 50px;
29 top: 50px;
30 left: 150px;
31 margin: 50px;
32 background-color: green;
33 scroll-snap-align: start;
36 #far-target {
37 width: 300px;
38 height: 300px;
39 top: 100px;
40 left: 500px;
41 background-color: red;
42 scroll-snap-align: start;
45 .area {
46 width: 2000px;
47 height: 2000px;
49 </style>
51 <div id="scroller">
52 <div class="area"></div>
53 <div id="close-target"></div>
54 <div id="far-target"></div>
55 </div>