- From: Emilio Cobos Álvarez via GitHub <sysbot+gh@w3.org>
- Date: Tue, 13 Feb 2024 01:52:08 +0000
- To: public-css-archive@w3.org
emilio has just created a new issue for https://github.com/w3c/csswg-drafts:
== [css-position] Static position of abspos top layer elements inside fixed pos. ==
This is the cyclic / ordering issue that I was concerned about in #8040.
Both Firefox and Blink get it wrong. WebKit gets it right, but I'm not sure what they're doing, maybe they're laying out the abspos twice?
```html
<!DOCTYPE html>
<meta charset="utf-8">
<style>
#outer {
position: fixed;
width: 200px;
height: 200px;
border: 2px solid blue;
}
dialog {
display: inline;
position: absolute;
inset: auto;
}
</style>
Some content.
<br>
<br>
<br>
<br>
<br>
Some more.
<br>
<div id=outer>
Fixed-pos.
<dialog>Absolute popover inside fixed element</dialog>
</div>
<script>
document.querySelector("dialog").showModal();
</script>
```
The main issue here is that you have:
* Viewport box
* ICB
* Abspos
* Fixedpos
So you lay out the abspos _before_ the fixedpos, and the static position isn't computed yet.
cc @rlbuis @bfgeek @chrishtr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/9939 using your GitHub account
--
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 13 February 2024 01:52:11 UTC