| <!DOCTYPE html> |
| <title>CSS Anchor Positioning Test: inherit height from fallback height</title> |
| <link rel="help" href="https://drafts.csswg.org/css-anchor-position-1/#position-try-fallbacks"> |
| <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> |