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-marker-selection-in-2d.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<head>
<title>CSS Test: scroll tracking for ::scroll-markers on 2-D scrollers selects from block and then from inline. </title>
<link rel="match" href="scroll-marker-selection-in-2d-ref.html">
</head>
<body>
<style>
.scroller {
width: 200px;
height: 200px;
position: relative;
border: solid;
scroll-marker-group: after;
overflow: scroll;
&::scroll-marker-group {
height: 100px;
width: 200px;
border: solid;
display: grid;
grid-auto-flow: column;
white-space: nowrap;
};
}
.vwm { /* vertical writing-mode */
writing-mode: vertical-lr;
}
.box {
position: absolute;
height: 50px;
width: 50px;
font-size: 50px;
background-color: blue;
&::scroll-marker {
height: 40px;
width: 40px;
font-size: 20px;
display: inline-block;
}
&::scroll-marker:target-current {
border: solid blue;
}
}
.top_right {
top: 0px;
left: 100px;
&::scroll-marker {
content: "";
background-color: teal;
}
}
.bottom_left {
top: 100px;
left: 0px;
&::scroll-marker {
content: "";
background-color: brown;
}
}
.space {
height: 800px;
width: 800px;
position: absolute;
}
</style>
<div>
<div class="scroller">
<div class="space"></div>
<div class="top_right box">TR</div>
<div class="bottom_left box">BL</div>
</div>
<div class="vwm scroller">
<div class="space"></div>
<div class="top_right box">TR</div>
<div class="bottom_left box">BL</div>
</div>
</div>
</body>
</html>