anchored-c-v-hidden.html (715B)
1 <!DOCTYPE html> 2 <title>CSS Anchor Positioning Test: Anchor positioned element with content-visibility:hidden</title> 3 <link rel="help" href="https://drafts.csswg.org/css-anchor-1/"> 4 <link rel="match" href="/css/reference/ref-filled-green-100px-square-only.html"> 5 <style> 6 #anchor { 7 anchor-name: --a; 8 width: 100px; 9 height: 100px; 10 } 11 #anchored { 12 position: absolute; 13 position-anchor: --a; 14 position-area: center; 15 content-visibility: hidden; 16 width: 100px; 17 height: 100px; 18 background-color: green; 19 } 20 #fail { background-color: red; } 21 </style> 22 <p>Test passes if there is a filled green square.</p> 23 <div id="anchor"></div> 24 <div id="anchored"> 25 <div id="fail">FAIL</div> 26 </div>