Re: [csswg-drafts] [css-anchor-position] Recent change in acceptable anchor element seems incomplete (#12830)

Argh, you're right. This is so tricky to get right!

Okay, Elika and I worked over the text again, and found a way to significantly simplify it. The "penultimate CB" condition is *really* just asking for the element generating that CB to also be an acceptable anchor element; you're allowed to anchor to anything CB-contained inside of an acceptable anchor. So we can just recurse, to handle that. This then lets us focus exclusively on the case where they have the same CB (or we've recurse up to an ancestor who has the same CB), where we have the meaningful conditions - earlier top layer, earlier in flat tree, etc.

Text is in <https://github.com/w3c/csswg-drafts/commit/a4f08e42f9486d10ad725ad224044540946e448c>. Look reasonable to you?

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12830#issuecomment-3309943459 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 18 September 2025 22:54:38 UTC