anchor-fixed-pos-descendant-ref.html (508B)
1 <!doctype html> 2 <title>CSS Test Reference</title> 3 <style> 4 p { 5 display: block; 6 outline: 1px solid; 7 height: 1lh; 8 anchor-name: --foo; 9 anchor-scope: --foo; 10 overflow: hidden; 11 resize: horizontal; 12 } 13 14 p > span { 15 position: fixed; 16 pointer-events: none; 17 inset: anchor(--foo inside); 18 right: anchor(--foo right, 0); 19 left: 0; 20 21 &::before { 22 content: ""; 23 position: absolute; 24 inset: 0; 25 width: 10px; 26 background-color: pink; 27 } 28 } 29 </style> 30 <p style="width: 100px"><span></span></p>