-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[css-motion] Default value for offset-anchor #41
Comments
Talking with @tabatkins about this, it seems like auto should default to the center as this is usually what you want. The clock use case is potentially an exception (although we have some reservations about whether the specified approach would work for angles other than multiples of 45 degrees) - can we: (1) make the default center |
The intent to make the default value of 'offset-anchor' as 'auto' was to make the offset-path model follows the background-position model which authors are familiar with. Also, figure6 needs to be fixed. It can confuse which one is the containing block. I agree with that when the path isn't an angle path, in the most case, centered offset-anchor is useful. |
As discussed in w3c#41 and at TPAC, the initial value of offset-anchor is center.
Last year's motion path spec didn't explicitly mention the origin of the element in motion, other than Issue 5, which mentioned motion-origin and transform-origin. The diagrams showed the center of the element being placed on the path. Chrome shipped using the transform-origin, which defaults to center.
The currently draft's initial value for offset-anchor is auto, which computes to the value from offset-position, whose initial value computes to the current position of the element.
It isn't obvious that any of the current diagrams in the spec accurately show the behavior when offset-anchor is auto. Most diagrams in the draft show the center of the element being placed on the path (and the clearest exception is Figure 6, which has non-default values for offset-anchor). Further, it isn't clear that auto is a useful default for a wide variety of motion-path scenarios, for example when motion-path isn't an angle, or when offset-position isn't specified using percentages.
Making center the default value for offset-anchor would have advantages for
The text was updated successfully, but these errors were encountered: