[csswg-drafts] [css-anchor-1] Behavior with transforms, offset-path, `position: sticky` etc (#8584)

kizu has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-anchor-1] Behavior with transforms, offset-path, `position: sticky` etc ==
<details>
<summary>Disclaimer and additional links</summary>

I'm submitting my feedback following my experiments with the current implementation of anchor positioning in Chrome Canary.

I wrote an article about my experiments, but decided to fill most of my feedback as separate issues here.

A quick summary of related links:

- [anchor positioning specs](https://drafts.csswg.org/css-anchor-position-1/)
- [my article with the experiments](https://kizu.dev/anchor-positioning-experiments/)
</details>

Right now, the positions for the anchors do not take into account things like transforms, `offset-path`, `position: sticky` when something is in a stuck position, and so on.

In practice, there were cases in my experiments where I wanted to use those — transforms and `offset-path` for the animations/transitions, and the adjusted position of an element with the `position: sticky` for things that should be shown for the stuck element (use case — a stuck toolbar with items having tooltips/dropdowns).

Currently, specs do not mention any of these cases — if those are intended to not be supported, the specs should be clarified, but I would suggest looking into providing an option to somehow follow those. Though, following the `position: sticky` should work from the box in my opinion.

I understand that for the transforms and offset-path things are probably much more complicated — but I foresee a lot of cases where developers would want an option to follow those. I wonder if this could be something like `anchor-transform` or whatever, which could be optionally used with `transform` on the anchored element? And maybe something similar with `offset-path` (though, maybe it could be similar to `position: sticky` in that it is easier to describe how it could work by default?)

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/8584 using your GitHub account


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

Received on Wednesday, 15 March 2023 12:22:46 UTC