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/under-invalidation.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
<style>
#container {
position: relative;
width: 100px;
height: 100px;
}
#anchor {
position: absolute;
anchor-name: --a;
width: 100px;
height: 10px;
top: 90px;
background: green;
}
#target {
position: absolute;
width: 100px;
min-height: 150px;
bottom: anchor(--a top);
background: green;
position-try-fallbacks: --fallback;
}
@position-try --fallback {
min-height: 90px;
}
</style>
<p>Test passes if there is a filled green square.</p>
<div id="container">
<div id="anchor"></div>
<div id="target"></div>
</div>