Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-anchor-position/inline-grid-try-fallbacks-crash.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html class=test-wait>
<title>CSS Anchor Positioning: Don't crash when animating position and position-try-fallbacks in grid</title>
<style>
@keyframes --anim {
from {
position: absolute;
position-try-fallbacks: flip-block;
}
}
#parent {
display: inline-grid;
}
#victim {
height:100em;
}
#victim.anim {
animation: --anim 100ms linear;
}
</style>
<p>PASS if no crash</p>
<div id=parent>
<div id=victim></div>
</div>
<script>
victim.classList.add('anim');
victim.addEventListener('animationend', () => {
victim.offsetTop;
document.documentElement.classList.remove('test-wait');
});
</script>
</html>