Re: [csswg-drafts] [css-anchor-position] Absolutely positioned element does not find fixed anchor (#10419)

> Your "anchor" is fixed positioned, so its containing block is the ICB.

@mfreed7 This is not true. The containing block of a fixed positioned box is the viewport (which does not scroll with the canvas), not the ICB (which does).

> And this point isn't true, because "anchor" is absolutely positioned (fixed counts as absolutely positioned), and "anchee" comes after "anchor" in the layout tree, again because "anchee" is fixed positioned.

Being fixedpos doesn't change a box's position in the box tree.

Note, the fixedpos in the OP's testcase matches this condition here:

> _Either el is a descendant of query el’s containing block, or query el’s containing block is the initial containing block._

by virtue of being a descendant of it and the abspos's mutual parent, not by having a containing block of the ICB. If the fixedpos were a sibling of the relpos box then it would fail both conditions. I'm pretty sure that's not intended.

The prose in this section is just awfully hard to read; if nothing else this issue should stay open for editorial improvements.


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


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

Received on Wednesday, 12 June 2024 23:05:43 UTC