- From: Temani Afif via GitHub <noreply@w3.org>
- Date: Tue, 21 Oct 2025 19:15:56 +0000
- To: public-css-archive@w3.org
Afif13 has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-anchor-position-1] Overflow behavior when no containing block is defined == I am going to refer to the following demo where you can drag the anchor element (testing in Chrome) : https://codepen.io/t_afif/pen/jEWzNrb/c09d5d9dad95028e28a16e90895dabc9 When I define `position: relative` on the body, I create a containing block for the "tooltip" element and when I drag the "anchor" close to the left/right edges, I get the shift behavior as described by the Spec: > If the box overflows its [inset-modified containing block](https://www.w3.org/TR/css-position-3/#inset-modified-containing-block), but would still fit within its [original containing block](https://www.w3.org/TR/css-position-3/#original-containing-block), by default it will “shift” to stay within its original containing block, even if that violates its normal alignment. The position is only flipped to the right or left when the anchor is dragged outside the body. Without `position: relative` on the body, the containing block of the "tooltip" is the initial containing block and the behavior is no longer the same. We don't have any shift and the position flips to left or right when the tooltip touches the edges of the screen. Is the last behavior correct according to the Spec? If so, where is it defined? I would expect to still have the "shift" behavior when I am close to the edges considering that the "initial containing block" in my example has the same area as the body element. Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/12999 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 21 October 2025 19:15:57 UTC