Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<title>position:sticky computes to position:absolute</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<dialog style="position: sticky"></dialog>
<script>
test(() => {
const dialog = document.querySelector('dialog');
assert_equals(getComputedStyle(dialog).position, 'sticky');
dialog.showModal();
assert_equals(getComputedStyle(dialog).position, 'absolute');
}, 'Once in the top-layer position:sticky computes to position:absolute');
</script>