Re: [csswg-drafts] [css-anchor-position] Add containing block rules to acceptable elements in top layer (#11602)

Would like to elaborate on what @jamesnw described - I'm actually unsure if the provided demo can be anchor positioned "for free." 

Yes, a prev layer's anchor is guaranteed to be laid out, but the containing block of the positioned element we're laying out isn't - Say there's a bunch of statically-positioned elements between the cb and the top popover element. Wouldn't that preclude us from positioning the anchor element w.r.t. containing block in question? 

Following that, I don't think we can **position** against an anchor that is not a descendant of the positioned element's abspos containing block, at least not without introducing some sort of additional steps. OTOH, we can **size** against anchors in a previous top layer just fine, though I'm not sure if that's useful.

FWIW, fixedpos' CB is viewport, so the whole issue is sidestepped.

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


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

Received on Tuesday, 13 May 2025 17:03:52 UTC