summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-scrollbars/scrollbar-color-dynamic-7.html
blob: 71bb93fb7263d9c3741c5e611961bdd1849c24c3 (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
43
44
45
46
47
<!doctype html>
<html class="reftest-wait">
<title>Dynamically set scrollbar-colors when starts auto and ensure scrollbars update</title>
<link rel="author" title="Luke Warlow" href="mailto:luke@warlow.dev" />
<link rel="help" href="https://drafts.csswg.org/css-scrollbars" />
<link rel="match" href="scrollbar-color-dynamic-7-ref.html" />
<link rel="mismatch" href="scrollbar-color-dynamic-7-mis-ref.html" />
<script src="/common/reftest-wait.js"></script>
<style>
  :root {
    scrollbar-color: auto;
  }
  body {
    display: flex;
    flex-wrap: wrap;
    width: 200vw;
    height: 200vh;
  }

  .container {
    scrollbar-gutter: stable;
    overflow: auto;
    flex: 0 0;
    height: 200px;
    min-width: 200px;
    margin: 1px;
    padding: 0px;
    border: none;
    background: deepskyblue;
  }

  .content {
    height: 300px;
    width: 300px;
    background: red;
  }
</style>
<div class="container">
  <div class="content"></div>
</div>
<script>
  requestAnimationFrame(() => requestAnimationFrame(() => {
    document.documentElement.style.scrollbarColor = 'blue green';

    takeScreenshot();
  }));
</script>