Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-tables/table-position-sticky-computed.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>Computed value of position:sticky for table elements</title>
<script src='/resources/testharness.js'></script>
<script src='/resources/testharnessreport.js'></script>
<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>