[fxtf-drafts] [motion-1] offset-anchor:auto is nonsensical (#502)

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

== [motion-1] offset-anchor:auto is nonsensical ==
[The definition of `offset-anchor: auto`](https://drafts.fxtf.org/motion-1/#offset-anchor-property) says:

> Computes to the value from offset-position, provided offset-path is none and offset-position is not auto. Otherwise, computes to the value from transform-origin. When auto is given to offset-anchor, and offset-path is none, offset-position behaves similar to background-position.

This is word salad. If I attempt to interpret it as directly as I can, it gives wildly nonsensical results - it implies that `offset-position: 100px 80px; offset-anchor: auto;` will specify the anchor as being 100px to the right and 80px down from the element's top-left corner (while the offset-position is 100px/80px from the *containing block's* top-left corner). The 'transform-origin' part makes sense (at least in theory, see below), but then the next sentence (about an `offset-path: none` element!) is simply nonsense.

Like 'offset-position' before my recent rewrite in 2823e66, I suspect this section's text is entirely a leftover of when the offset properties were defined as a type of absolute positioning, rather than a type of transform, and if you didn't say anything specific about the path it defaulted to using 'offset-position' as an alternative to 'top'/'left'.

Also, 'transform-origin' is defined relative to the 'transform-box'. Motion doesn't have the same thing; if you just say "computes to the value of transform-origin" but transform-box is a non-initial value, you'll end up with the anchor point *not* matching the transform origin.

------

Suggested fix: `offset-anchor: auto` just sets the anchor point to be the same point as the transform origin. (This'll have to be specified in slightly more detail, since transform-origin doesn't *technically* define a point; instead it defines a pair or trio of lengths that feed into the transform matrix as a translate before and after the rest of the transforms. But this should be pretty easy to do.)

Please view or discuss this issue at https://github.com/w3c/fxtf-drafts/issues/502 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:21:09 UTC