Skip to content
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

Closed
ewilligers opened this issue Sep 6, 2016 · 2 comments
Closed

[css-motion] Default value for offset-anchor #41

ewilligers opened this issue Sep 6, 2016 · 2 comments

Comments

@ewilligers
Copy link
Contributor

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

  • simplicity
  • backwards compatibility for Chrome
  • consistency with existing diagrams in spec
@shans
Copy link
Contributor

shans commented Sep 6, 2016

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
(2) talk about whether the currently specified behavior makes sense for the clock use case at TPAC, and add an extra keyword if so?

@jihyerish
Copy link

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.
The offset-path is not just about motion, and it became the way to position elements.

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.
Can we discuss about this to deal with the clock use case at TPAC?

ewilligers pushed a commit to ewilligers/fxtf-drafts that referenced this issue Sep 22, 2016
As discussed in w3c#41 and at TPAC, the initial value of
offset-anchor is center.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants