diff options
Diffstat (limited to 'testing/web-platform/tests/css/css-anchor-position/inset-area-scroll-adjust.html')
-rw-r--r-- | testing/web-platform/tests/css/css-anchor-position/inset-area-scroll-adjust.html | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-anchor-position/inset-area-scroll-adjust.html b/testing/web-platform/tests/css/css-anchor-position/inset-area-scroll-adjust.html new file mode 100644 index 0000000000..0d3cef4fc9 --- /dev/null +++ b/testing/web-platform/tests/css/css-anchor-position/inset-area-scroll-adjust.html @@ -0,0 +1,38 @@ +<!DOCTYPE html> +<title>CSS Anchor Positioning: inset-area anchored against scrolling anchor</title> +<link rel="help" href="https://drafts.csswg.org/css-anchor-position/#inset-area"> +<link rel="match" href="inset-area-scroll-adjust-ref.html"> +<style> + #scroller { + width: 400px; + height: 200px; + overflow: auto; + } + #anchor { + background: green; + width: 200px; + height: 100px; + } + #anchored { + inset-area: bottom; + margin: 0; + padding: 0; + border: none; + background: green; + width: 200px; + height: 100px; + } + .filler { height: 200px; } +</style> +<p>You should see a green square below</p> +<div id="scroller"> + <div class="filler"></div> + <div id="anchor" popovertarget="anchored"></div> + <div id="anchored" anchor="anchor" popover></div> + <div class="filler"></div> + <div class="filler"></div> +</div> +<script> + anchored.showPopover(); + scroller.scrollTop = 200; +</script> |