diff options
Diffstat (limited to 'testing/web-platform/tests/css/css-anchor-position/reference/anchor-scroll-vrl-ref.html')
-rw-r--r-- | testing/web-platform/tests/css/css-anchor-position/reference/anchor-scroll-vrl-ref.html | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/testing/web-platform/tests/css/css-anchor-position/reference/anchor-scroll-vrl-ref.html b/testing/web-platform/tests/css/css-anchor-position/reference/anchor-scroll-vrl-ref.html new file mode 100644 index 0000000000..2366a7dc09 --- /dev/null +++ b/testing/web-platform/tests/css/css-anchor-position/reference/anchor-scroll-vrl-ref.html @@ -0,0 +1,70 @@ +<!DOCTYPE html> +<title>Tests that anchor positioned scrolling works in vertical-rl writing mode</title> +<link rel="author" href="mailto:xiaochengh@chromium.org"> +<link rel="help" href="https://drafts.csswg.org/css-anchor-1/#anchor-scroll"> +<link rel="stylesheet" href="/fonts/ahem.css"> +<style> +:root { + overflow: clip; +} + +body { + font: 20px/1 Ahem; + margin: 0; + writing-mode: vertical-rl; + white-space: nowrap; +} + +#scroll-container { + width: 400px; + height: 400px; + overflow: scroll; +} + +#scroll-contents { + width: 1000px; + height: 1000px; + position: relative; +} + +#placefiller-above-anchor { + width: 480px; +} + +#placefiller-before-anchor { + display: inline-block; + height: 500px; +} + +#anchor { + anchor-name: --anchor; +} + +#inner-anchored { + margin-top: 520px; + color: green; +} + +#outer-anchored { + margin-top: 520px; + color: yellow; +} +</style> + +<div style="position: relative;"> + <div id="scroll-container"> + <div id="scroll-contents"> + <div id="placefiller-above-anchor"></div> + <div id="inner-anchored">inner-anchored</div> + <div id="placefiller-before-anchor"></div> + <span id="anchor">anchor</span> + <div id="outer-anchored">outer-anchored</div> + </div> + </div> +</div> + +<script> +const scroller = document.getElementById('scroll-container'); +scroller.scrollTop = 450; +scroller.scrollLeft = -300; +</script> |