Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<title>CSS Overflow Test: Dynamically change a ::scroll-marker-group</title>
<link rel="match" href="scroll-marker-group-add-dynamic-001-ref.html">
<style>
#scroller {
scroll-marker-group: before;
overflow: auto;
width: 200px;
height: 200px;
}
#item::scroll-marker {
content: "PASS"
}
#scroller::scroll-marker-group {
display: flex;
}
#scroller.group::scroll-marker-group {
display: block;
height: 100px;
}
</style>
<p>Test passes if there is the word "PASS" below.</p>
<div id="scroller">
<div id="item"></div>
</div>
<script>
scroller.offsetTop;
scroller.className = "group";
</script>