summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/css/css-tables/table-position-sticky-computed.html
blob: b0116aefb098ff2fdae219bc8b54739c6dcd6f67 (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
<!DOCTYPE html>
<title>Computed value of position:sticky for table elements</title>
<script src='/resources/testharness.js'></script>
<script src='/resources/testharnessreport.js'></script>
<link rel="help" href="https://www.w3.org/TR/css-tables-3">
<link rel="help" href="https://crbug.com/1307976">
<style>
  table * {
    position: sticky;
  }
</style>

<table>
  <thead>
  </thead>
  <tbody>
    <tr>
      <td>Test</td>
    </tr>
  </tbody>
  <tfoot>
  </tfoot>
</table>

<script>
  for (let element of document.querySelectorAll('table *')) {
    test(() => {
      assert_equals(getComputedStyle(element).position, 'sticky');
    }, `Computed value of position:sticky on ${element.tagName}`);
  }
</script>