Source code

Revision control

Copy as Markdown

Other Tools

Test Info:

<!DOCTYPE html>
<title>Tests that scrolling doesn't crash renderer when anchor is in a scroller whose content doesn't overflow</title>
<link rel="author" href="mailto:xiaochengh@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-anchor-1/">
<style>
#container {
position: relative;
}
#scroller {
overflow: scroll;
width: 400px;
height: 400px;
}
#anchor {
anchor-name: --a;
margin: 100px;
width: 100px;
height: 100px;
background: green;
}
#anchored {
position: absolute;
position-anchor: --a;
left: anchor(--a left);
bottom: anchor(--a top);
width: 100px;
height: 100px;
background: orange;
}
</style>
<div id="container">
<div id="scroller">
<div id="anchor">anchor</div>
</div>
<div id="anchored">anchored</div>
</div>