summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-contain/content-visibility/spacer-and-container-scrolled-ref.html
blob: a3f8079595378781de584179beeb63072c50810a (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
<!doctype HTML>
<html>
<meta charset="utf8">
<title>Content Visibility: spacer and a container, scrolled to container (reference)</title>
<link rel="author" title="Vladimir Levin" href="mailto:vmpstr@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-contain/#content-visibility">

<style>
.spacer {
  width: 150px;
  height: 300vh;
  background: lightblue;
}
#container {
  width: 150px;
  height: 150px;
  background: green;
}
</style>

<div class="spacer"></div>
<div id="container">Test passes if this is on screen.</div>

<script>
onload = () => container.scrollIntoView();
</script>
</html>