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

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.

Received on Friday, 10 February 2012 22:42:17 UTC