oddbird / css-anchor-positioning

Polyfill for CSS Anchor Positioning
https://anchor-polyfill.netlify.app/
BSD 3-Clause "New" or "Revised" License
225 stars 5 forks source link

Use Layout/Box tree order instead of DOM Tree order #209

Open jamesnw opened 1 week ago

jamesnw commented 1 week ago

Per @mfreed7- " What matters is that the anchor element gets laid out first, and the anchored/positioned element gets laid out after that."

DOM and Layout/Box tree order are quite similar, but aren't identical. For a counter example, see https://github.com/web-platform-tests/wpt/blob/master/css/css-anchor-position/anchor-position-top-layer-005.html.

https://github.com/oddbird/css-anchor-positioning/pull/207

Related: