[fxtf-drafts] [motion-1] offset-position:auto has bad behavior (#501)

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

== [motion-1] offset-position:auto has bad behavior ==
Currently, the spec for `offset-position: auto` specifies that the starting point for the offset path is the top-left corner of the box.

When this interacts with a non-auto 'offset-anchor', this gives bad behavior - it becomes impossible to start a path from the box's original position. Instead, the box shifts slightly, to align its anchor with where its top-left corner was originally.

The first example in <https://drafts.fxtf.org/motion-1/#offset-position-property> shows that this is indeed the intended behavior - the green box is first abspos'd 80px to the right and 100px down, then its anchor-position (which is `center`) kicks in and the box shifts 40px left and 50px up so that its center point is at that (80, 100) point.

I suspect this is a weird leftover of when this spec was defined in terms of abspos rather than transforms. The (imo) clearly superior behavior for `offset-position: auto` would be to just use the anchor position itself, so at `offset-distance: 0%` the box just... stays exactly where it is.

Do we think this is possible to change? The only offset path that pays attention to offset-position is ray(), so maybe the change is minimal in practice?

(Again, the core use-case for ray() is positioning things around a round clock face. Using `position: absolute; top: 50%; left: 50%; offset-anchor: center;` would work for this in the current spec; in the fixed spec you'd instead write `offset-position: center; offset-anchor: center;`. The old way would still *mostly* work, it would just start the rays slightly off-center.)

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


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

Received on Friday, 3 March 2023 20:09:33 UTC