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/inherit-height-from-fallback.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<title>CSS Anchor Positioning Test: inherit height from fallback height</title>
<link rel="match" href="../reference/ref-filled-green-100px-square-only.html">
<style>
#container {
position: relative;
}
#anchor {
anchor-name: --a1;
width: 0px;
height: 100px;
}
#anchored {
position-area: left center;
position: absolute;
position-anchor: --a1;
position-try-fallbacks: --f1;
width: 100px;
}
#child {
height: inherit;
background: green;
}
@position-try --f1 {
position-area: right center;
height: 100px;
}
</style>
<p>Test passes if there is a filled green square.</p>
<div id="container">
<div id="anchor"></div>
<div id="anchored">
<div id="child"></div>
</div>
</div>