| <!DOCTYPE html> |
| <title>Anchor name resolution of OOF anchors in multicol</title> |
| <link rel="help" href="https://drafts.csswg.org/css-anchor-1/#propdef-anchor-name"> |
| <link rel="help" href="https://drafts.csswg.org/css-anchor-1/#anchor-size"> |
| <link rel="author" href="mailto:kojii@chromium.org"> |
| <link rel="author" href="mailto:mstensho@chromium.org"> |
| <style> |
| .relpos { |
| position: relative; |
| } |
| .abspos { |
| position: absolute; |
| } |
| .columns { |
| columns: 6; |
| column-fill: auto; |
| column-gap: 10px; |
| width: 530px; |
| height: 100px; |
| } |
| .spacer { |
| height: 10px; |
| } |
| .anchor { |
| anchor-name: --a1; |
| width: 10px; |
| } |
| .target { |
| position: absolute; |
| left: anchor(--a1 left); |
| top: anchor(--a1 top); |
| width: anchor-size(--a1 width); |
| height: anchor-size(--a1 height); |
| } |
| </style> |
| <link rel="match" href="../reference/ref-filled-green-100px-square.xht"> |
| <p>Test passes if there is a filled green square and <strong>no red</strong>.</p> |
| <!-- All targets should find the static positioned anchor --> |
| <div style="width:100px; height:100px; background:red;"> |
| <div class="relpos"> |
| <div class="columns relpos"> |
| <div class="relpos"> |
| <div style="width:10px; height:10px; background:green;"></div> |
| <div class="anchor abspos" style="top:220px; height:200px;"></div> |
| <div class="anchor" style="height:120px;"></div> |
| <div style="width:10px; height:70px; background:green;"></div> |
| <div class="target" style="background:green;"></div> |
| </div> |
| <div class="target"> |
| <div style="margin-left:10px; width:80px; height:100%; background:green;"></div> |
| </div> |
| </div> |
| </div> |
| </div> |