Re: [css-transforms] computed style of 'transform' property

On Mar 25, 2014, at 11:30 PM, Tab Atkins Jr. <jackalmage@gmail.com> wrote:

> On Tue, Mar 25, 2014 at 2:29 PM, L. David Baron <dbaron@dbaron.org> wrote:
>> On Monday 2013-12-16 09:20 +0000, Dirk Schulze wrote:
>>> We discussed and decided in the past that the "computed style” of the ‘transform’ property must return the specified value [1]. This has been in the spec since the first WD.
>>> 
>>> Yet, no browser ever implemented this part of the spec. For what it’s worth, all browsers seems to return a matrix()/matrix3d() string.
>>> 
>>> Even if we had the agreement from browser implementers in the past to change the behavior, no browser ever did and users are starting to rely on a matrix as returned value.
>>> 
>>> I suggest we specify the behavior of browsers and do not return the specified value. Implementations must return a string “matrix()” with 6 numerical values on a pure 2D matrix[2] (all transform functions multiplied as in [3]) and a string "matrix3d()” with 16 numerical values otherwise.
>> 
>> I think you're confusing the "Computed value" field of the property
>> description with the getComputedStyle() method.  The "Computed
>> style" describes the conceptual computed value, which in turn is
>> what is inherited and used for other things in the CSS processing
>> model, such as triggering CSS transforms.  Changing this to be
>> matrix() would break transitions and animations of CSS transforms,
>> since all animations would operate on matrix() values.
>> 
>> The getComputedStyle() method should indeed return matrix(), but
>> that's not what the "Computed value:" line means.
> 
> In other words, the *serialization* of the computed value must use
> matrix() or matrix3d(), but the computed value itself is still what
> the spec says.

You are both correct.

Greetings,
Dirk

> 
> ~TJ

Received on Wednesday, 26 March 2014 05:39:16 UTC