Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-overflow/scroll-markers/scroll-marker-group-position-change-001.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>CSS Overflow Test: Changing scroll-marker-group from before to after</title>
<link rel="match" href="scroll-marker-group-position-change-001-ref.html">
<!-- No ::scroll-marker-group rule on purpose: the group must move without
any pseudo-element styles on the scroller. -->
<style>
#scroller {
scroll-marker-group: before;
overflow: hidden;
width: 50px;
height: 50px;
background: blue;
}
#item::scroll-marker {
content: "";
display: block;
margin-left: 50px;
width: 50px;
height: 50px;
background: green;
}
</style>
<p>Test passes if there is a blue square with a green square below and to the right of it.</p>
<div id="scroller"><div id="item"></div></div>
<script>
scroller.offsetTop;
scroller.style.scrollMarkerGroup = "after";
</script>