W3C home > Mailing lists > Public > www-style@w3.org > February 2012

Re: [css3-transforms] translate() vs. translate3d()

From: Chris Marrin <cmarrin@apple.com>
Date: Fri, 10 Feb 2012 15:14:03 -0800
Cc: "www-style@w3.org CSS" <www-style@w3.org>
Message-id: <F8069D3D-49D1-4DB1-B610-5CB5FBEAF49C@apple.com>
To: Christoph Päper <christoph.paeper@crissov.de>

On Feb 10, 2012, at 2:41 PM, Christoph Päper wrote:

> Tab Atkins Jr. (2012-02-10 19:21):
> 
>> Argh, the commas, they kill me.
> 
> Have you seen ‘matrix3d()’ (not a movie)?
> 
> Maybe it should rather be
> 
>  ‘matrix(’ [
>    <value> <value> <value=0>? ‘,’
>    <value> <value> <value=0>? ‘,’
>    <value> <value> <value=1>?
>  ] | [
>    <value> <value> <value> <value=0>? ‘,’
>    <value> <value> <value> <value=0>? ‘,’
>    <value> <value> <value> <value=0>? ‘,’
>    <value> <value> <value> <value=1>?
>  ] ‘)’
> 
> or
> 
>  ‘matrix(’
>    <value>   <value>   [<value=0> <value=0>?]?   ‘,’
>    <value>   <value>   [<value=0> <value=0>?]?   ‘,’
>    <value>   <value>   [<value=1> <value=0>?]? [ ‘,’
>    <value=0> <value=0> [<value=0> <value=1>?]? ]?
>  ‘)’
> 
> That is either a 3*3 or a 4*4 matrix where the last row has default values. One could of course also default all values to the identity matrix, but making even more values optional could become harder to grasp than dealing with many values.

As has been mentioned before, matrix() and matrix3d() have very specialized use cases, so I don't think making them more "friendly" really helps much. In the rare case where a matrix3d() is actually entered in the source (as opposed to being generated in JS), it's all going to be a series of seemingly meaningless numbers. So I don't think getting rid of a few 1's and 0's will help readability.

-----
~Chris
cmarrin@apple.com
Received on Friday, 10 February 2012 23:14:31 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:50 GMT