blob: a74a1131e363e3d8d1c6a0cf6de7765d9ac50567 (
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
|
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title> CSS Scroll Snap 2 Test: scroll-start-*</title>
<link rel="help" href="https://drafts.csswg.org/css-scroll-snap-2/#scroll-start">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
</head>
<body>
<style>
:root {
scroll-start: 10vh 200px;
}
.spacer {
width: 200vw;
height: 200vh;
border: solid 1px green;
}
</style>
<div class="spacer"></div>
<script>
promise_test(async (t) => {
assert_equals(window.scrollX, 200,
"scroll-start: <length> sets initial scroll position");
assert_equals(window.scrollY, 0.1 * window.innerHeight,
"scroll-start: <length> sets initial scroll position");
}, "scroll-start sets the initial scroll position of the document");
</script>
</body>
|