w3c / csswg-drafts

CSS Working Group Editor Drafts
https://drafts.csswg.org/
Other
4.52k stars 672 forks source link

[css-anchor-position] Was changing acceptable element algorithm intentional? #11170

Open anttijk opened 2 weeks ago

anttijk commented 2 weeks ago

https://github.com/w3c/csswg-drafts/commit/fe8e40d37faae "Rewrite the ordering conditions on 'acceptable anchor element' to be more explicit and hopefully clearer" actually changed the algorithm somewhat. Specifically in the "different containing blocks" case the tree order of the elements no longer matters. This affects for example

http://wpt.live/css/css-anchor-position/anchor-name-002.html (the first target now gets anchored) http://wpt.live/css/css-anchor-position/anchor-scroll-002.html (all targets attach to the last anchor)

The commit message indicated that the intention was to clarify the algorithm so I'm wondering if the behavior changes were intentional?