Re: [csswg-drafts] [css-anchor-position-1] Interaction with `anchor-center` and scrolling (#9223)

Does this depend on how the insets are resolved? E.g. If the anchor is outside the containing-block, we can resolve the insets to be the larger rect, i.e "Option I".

```
Inside:
+--------------------------+
|                          |
|         <--------------->|
|                          |
|               +---+      |
|               |   |      |
|               | A |      |
|               |   |      |
|               +---+      |
|                          |
+--------------------------+

Outside I:
+--------------------------+
|                          |
|<-------------------------+----------------------------->
|                          |
|                          |   +---+
|                          |   |   |
|                          |   | A |
|                          |   |   |
|                          |   +---+
|                          |
+--------------------------+

Outside II:
+--------------------------+
|                          |
|                          |   <--->
|                          |
|                          |   +---+
|                          |   |   |
|                          |   | A |
|                          |   |   |
|                          |   +---+
|                          |
+--------------------------+
```

The nice thing about the current approach - is that shrink-to-fit sizing "just works" e.g. it'll expand up to the current area which is desirable.

(There are a few other variations, e.g. Option II if outside will expand up to the size of the anchor, another variant would be to expand up to the edge of the original containing block).

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


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

Received on Tuesday, 22 August 2023 23:48:36 UTC