summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-contain/content-visibility/content-visibility-vs-scrollIntoView-001-ref.html
blob: 746d770f85a95e50e9b4c3e989fc4949551376ae (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
40
41
42
<!doctype HTML>
<html class="reftest-wait">
<meta charset="utf8">
<title>Nested CSS Content Visibility: auto + scrollIntoView</title>
<link rel="author" title="Cathie Chen" href="mailto:cathiechen@igalia.com">
<link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility">
<meta name="assert" content="Test if target scrollIntoView is visible when it is inside a nested content-visibility: auto">
<link rel="stylesheet" type="text/css" href="/fonts/ahem.css" />
<script src="/common/reftest-wait.js"></script>

<style>

    .child {
        height: 40000px;
        position: relative;
    }

    #target {
        position: absolute;
        bottom: 0;
        font: 25px/1 Ahem;
    }

    .before_target {
        height: 40000px;
    }
</style>

<div id=e1 class="before_target"></div>
<div id=e2 class="before_target"></div>
<div id=e3 class="before_target"></div>
<div id=e4 class="before_target"></div>
<div id=e5 class=child>
    <div id=target>PASS</div>
</div>

<script>
    window.onload = () => {
        target.scrollIntoView();
        requestAnimationFrame(takeScreenshot);
    }
</script>