- From: L. David Baron <dbaron@dbaron.org>
- Date: Wed, 26 Feb 2014 15:48:18 -0800
- To: public-fx@frink.w3.org
- Message-ID: <20140226234818.GA5390@crum.dbaron.org>
I'm sending this feedback as a result of a Mozilla bug report, filed by an author who saw bad transform interpolation behavior: https://bugzilla.mozilla.org/show_bug.cgi?id=977311 http://dev.w3.org/csswg/css-transforms/#interpolation-of-transforms says: If from- and to-transform have the same number of transform functions, each transform function pair has either the same name, or is a derivative of the same primitive. Then http://dev.w3.org/csswg/css-transforms/#interpolation-of-transform-functions : The transform functions matrix(), matrix3d() and perspective() get converted into 4x4 matrices first and interpolated as defined in section Interpolation of Matrices afterwards. This means that if you interpolate two lists that consist of: perspective() rotateY() perspective() rotateY() you get an interpolation result that is: matrix3D() rotateY() When you try to interpolate that result with another value of the form: perspective() rotateY() we fall back to the "Lists don't match" path in the first quote. This is important for reversing of partially-completed transitions. If an author has div { transition: transform; transform: perspective(800px) rotateY(180deg); } #container:hover div { transform: perspective(800px) rotateY(300deg); } then if the transition is interrupted partway through, it should reverse the same way it came (per-function interpolation) rather than reversing in an entirely different way (matrix interpolation fallback). -David -- 𝄞 L. David Baron http://dbaron.org/ 𝄂 𝄢 Mozilla https://www.mozilla.org/ 𝄂 Before I built a wall I'd ask to know What I was walling in or walling out, And to whom I was like to give offense. - Robert Frost, Mending Wall (1914)
Received on Wednesday, 26 February 2014 23:49:06 UTC