| <!DOCTYPE html> |
| <title>position:sticky computes to position:absolute</title> |
| <link rel="help" href="https://drafts.csswg.org/css-position-4/#top-styling"> |
| <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> |
| |