summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-scrollbars/scrollbar-color-scheme-dynamic-4.html
blob: 9655a0ebb2429585bb482a2872d310b23ea55c46 (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
<!doctype html>
<html class="reftest-wait">
<title>Dynamically set color-scheme and ensure viewport scrollbars update</title>
<link rel="author" title="Luke Warlow" href="mailto:luke@warlow.dev" />
<link rel="help" href="https://drafts.csswg.org/css-scrollbars/#valdef-scrollbar-color-auto" />
<link rel="match" href="scrollbar-color-scheme-dynamic-4-ref.html" />
<script src="/common/reftest-wait.js"></script>
<style>
  :root {
    color-scheme: light;
  }
  body {
    display: flex;
    flex-wrap: wrap;
    overflow: scroll;
  }
  .container {
    scrollbar-gutter: stable;
    overflow: scroll;
    flex: 0 0;
    height: 200px;
    min-width: 200px;
    margin: 1px;
    padding: 0px;
    border: none;
    background: deepskyblue;
  }
</style>
<div class="container"></div>
<script>
  requestAnimationFrame(() => requestAnimationFrame(() => {
    document.querySelector(".container").style.colorScheme = 'dark';

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