anchor-function-in-calc-number-crash.html (904B)
1 <!DOCTYPE html> 2 <title>CSS Anchor Positioning: Crash with anchor functions in calc() with number fallback</title> 3 <link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1998106"> 4 <style> 5 .anchor { 6 anchor-name: --a; 7 width: 100px; 8 height: 100px; 9 background: magenta; 10 } 11 .positioned { 12 position: absolute; 13 position-anchor: --a; 14 width: 10px; 15 height: 10px; 16 background: purple; 17 } 18 </style> 19 <div class=anchor></div> 20 <div class=positioned style="left: calc(anchor(left, Infinity) + 1px);"></div> 21 <div class=positioned style="left: calc(anchor(left, 0) + 1px);"></div> 22 <div class=positioned style="left: calc(anchor(left, 1) + 1px);"></div> 23 <div class=positioned style="width: calc(anchor-size(width, Infinity) + 1px);"></div> 24 <div class=positioned style="width: calc(anchor-size(width, 0) + 1px);"></div> 25 <div class=positioned style="width: calc(anchor-size(width, 1) + 1px);"></div>