- From: Xiaocheng Hu via GitHub <sysbot+gh@w3.org>
- Date: Fri, 11 Nov 2022 00:56:29 +0000
- To: public-css-archive@w3.org
xiaochengh has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-anchor-1] Issues with position fallback == In a discussion with @bfgeek today we identified some issues about how position fallback is currently specified. 1. For each fallback position, there should be an additional criterion that the margin box rect of the element (without scroll adjustments) should not overflow the [inset-modified containing block](https://drafts.csswg.org/css-position/#inset-modified-containing-block). This is for some use cases (like below) where the element doesn't overflow the containing block, but instead overlaps with the anchor, which is still undesirable. ```html <style> #anchor { anchor-name: --a; margin-left: 20px; } #anchored { position: fixed; top: anchor(--a top); width: min-content; position-fallback: --pf; } @position-fallback --pf { @try { left: 0; right: anchor(--a left); } @try { right: 0; left: anchor(--a right); } } </style> <div id=anchor>anchor</div> <div id=anchored>some very loooooooooooooooooooooooong content</div> ``` 2. We still need to make sure the scroll-shifted margin box doesn't overflow the original (not-inset-modified) containing block. But the spec isn't clear which box of the containing block to compare to: content, padding or border box? Content box makes the most sense to me. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8059 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Friday, 11 November 2022 00:56:31 UTC