summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-color-adjust/rendering/dark-color-scheme/color-scheme-table-border-currentcolor-responsive.html
blob: 1d42a4fddabe8c3337ced4f9ad9b676b4b25c09b (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<!DOCTYPE html>
<html class="reftest-wait">
<title>CSS Color Adjust: border-color:currentColor is responsive to color-scheme for collapsed table borders</title>
<link rel="help" href="https://drafts.csswg.org/css-color-adjust">
<link rel="help" href="https://crbug.com/1256758">
<link rel="match" href="color-scheme-table-border-currentcolor-responsive-ref.html">
<script src="/common/reftest-wait.js"></script>
<style>
  :root {
    background-color: gray;
  }

  table {
    border-collapse: collapse;
  }
  table, table * {
    border: none;
  }

  #table, #col, #tr, #th, #td, #tbody {
    border: 5px solid currentColor;
    color: CanvasText;
  }

  * {
    color-scheme: initial;
  }

  .dark {
    color-scheme: dark;
  }

</style>

<!-- <table> -->
<table id=table>
  <tr>
    <td>X</td>
  </tr>
</table>

<!-- <col> -->
<table>
  <colgroup>
    <col id=col></col>
  </colgroup>
  <tr>
    <td>X</td>
  </tr>
</table>

<!-- <tr> -->
<table>
  <tr id=tr>
    <td>X</td>
  </tr>
</table>

<!-- <th> -->
<table>
  <tr>
    <th id=th>X</th>
  </tr>
</table>

<!-- <td> -->
<table>
  <tr>
    <td id=td>X</td>
  </tr>
</table>

<!-- <tbody> -->
<table>
  <tbody id=tbody>
    <tr>
      <td>X</td>
    </tr>
  </tbody>
</table>

<script>
  requestAnimationFrame(() => {
    requestAnimationFrame(() => {
      for (let e of [table, col, tr, th, td, tbody])
        e.classList.toggle('dark');
      takeScreenshot();
    });
  });
</script>
</html>