diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /testing/web-platform/tests/css/css-anchor-position/anchor-scroll-to-sticky-003.html | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testing/web-platform/tests/css/css-anchor-position/anchor-scroll-to-sticky-003.html')
-rw-r--r-- | testing/web-platform/tests/css/css-anchor-position/anchor-scroll-to-sticky-003.html | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-anchor-position/anchor-scroll-to-sticky-003.html b/testing/web-platform/tests/css/css-anchor-position/anchor-scroll-to-sticky-003.html new file mode 100644 index 0000000000..0e77004491 --- /dev/null +++ b/testing/web-platform/tests/css/css-anchor-position/anchor-scroll-to-sticky-003.html @@ -0,0 +1,48 @@ +<!DOCTYPE html> +<title>Tests scroll adjustments of element anchored to a sticky-position element</title> +<link rel="author" href="mailto:wangxianzhu@chromium.org"> +<link rel="help" href="https://drafts.csswg.org/css-anchor-1/"> +<link rel="match" href="reference/anchor-scroll-to-sticky-001-ref.html"> +<style> +body { + margin: 0; +} + +div { + width: 100px; + height: 100px; +} + +#scroller { + overflow: scroll; +} + +#anchor { + anchor-name: --a1; + position: sticky; + top: 0; + height: 20px; + background: orange; +} + +#anchored { + position: absolute; + anchor-default: --a1; + left: anchor(--a1 left); + top: anchor(--a1 bottom); + background: green; +} + +</style> + +<!-- Anchored to later sticky-positioned. --> +<div id="anchored"></div> +<div id="scroller"> + <div style="height: 50px"></div> + <div id="anchor"></div> + <div style="height: 300px"></div> +</div> + +<script> +scroller.scrollTop = 200; +</script> |