diff options
Diffstat (limited to 'tests/wpt/tests/css/css-overflow/scroll-target-group-006.html')
-rw-r--r-- | tests/wpt/tests/css/css-overflow/scroll-target-group-006.html | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/tests/wpt/tests/css/css-overflow/scroll-target-group-006.html b/tests/wpt/tests/css/css-overflow/scroll-target-group-006.html new file mode 100644 index 00000000000..6154845199a --- /dev/null +++ b/tests/wpt/tests/css/css-overflow/scroll-target-group-006.html @@ -0,0 +1,52 @@ +<!DOCTYPE html> +<meta charset="utf-8"> +<title>CSS Overflow Test: scroll-target-group property invalidation - anchor and target removal and addition</title> +<link rel="help" href="https://drafts.csswg.org/css-overflow-5/#scroll-target-group"> +<link rel="match" href="scroll-target-group-001-ref.html"> +<style> + .wrapper { + scroll-target-group: auto; + } + + #scroller { + overflow: auto; + height: 130px; + width: 100px; + } + + #scroller div { + width: 100px; + height: 100px; + background-color: blue; + margin: 5px; + } + + a { + color: red; + } + + a:target-current { + color: green; + } +</style> +<div id="target" class="wrapper"> + <a id="link1" href="#target1">t1</a> + <a href="#target2">t2</a> + <a href="#target3">t3</a> + <a href="#target4">t4</a> +</div> +<div id="scroller"> + <div id="target1"></div> + <div id="target2"></div> + <div id="target3"></div> + <div id="target4"></div> +</div> +<script> + const newLink1 = link1.cloneNode(true); + const newTarget1 = target1.cloneNode(); + target.removeChild(link1); + scroller.removeChild(target1); + document.documentElement.offsetTop; + target.prepend(newLink1); + scroller.prepend(newTarget1); +</script> |