Re: [csswg-drafts] [css-position] Static position of abspos top layer elements inside fixed pos. (#9939)

I agree that Chrome appears to render this example wrong (I made the example into [a jsbin here](https://output.jsbin.com/gameleyeci)). What's wrong about it is that it has an incorrect static position that includes the content under the ICB ("some content", a few `<br>`s, and "some more"). Since the containing block of the abspos element is the viewport in this case, those should not contribute to its static position.

It looks like one can see the bug more clearly in [this demo](https://output.jsbin.com/zizojefuko/1) which uses position:relative and `top:10px`, which positions correctly in Chrome. Before adding `top:10px` the static position is also wrong, but after adding `top:10px` it renders correctly in Chrome.

Perhaps there is an issue with circularity, or at least extra complications, in computing static positions correctly in cases like this, though I think it's just a straight-up bug in Chrome that I think could be fixed by computing static positions separately in the top layer. @bfgeek WDYT?

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


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

Received on Friday, 10 May 2024 21:45:32 UTC