- From: Chris Marrin <cmarrin@apple.com>
- Date: Fri, 10 Feb 2012 14:53:09 -0800
- To: "Tab Atkins Jr." <jackalmage@gmail.com>
- Cc: Simon Sapin <simon.sapin@kozea.fr>, www-style@w3.org
On Feb 9, 2012, at 2:44 AM, Tab Atkins Jr. wrote: > On Wed, Feb 8, 2012 at 2:39 AM, Simon Sapin <simon.sapin@kozea.fr> wrote: >> Hi, >> >> The syntax for a matrix transformation in the current ED is: >> >> matrix(<number>, <number>, <number>, <number>, <number>, <number>) >> >> The meaning is defined in the SVG spec: >> http://www.w3.org/TR/SVG/images/coords/MatrixMultiply.png >> >> From this definition, it is apparent that a, b, c and d in >> matrix(a,b,c,d,e,f) are multiplied by a length and give a new length, so >> they are unit-less numbers. However, e and f are multiplied by a unit-less >> one and give a length, so they are lengths too. >> >> What is the unit for e and f? I can’t find this defined in the spec. SVG >> gets away with it since unit-less numbers are valid lengths there, but this >> is not the case in CSS. > > Based on the FtF discussion, the arguments for matrix() and matrix3d() > will stay plain numbers, with an assumed unit of px or 1/px as > appropriate. > > The reasoning was: > > 1) The e and f arguments of matrix() are equivalent to the arguments > to the translate() function. Authors shouldn't ever be writing a > matrix() function in the first place, so they should just use > translate() instead. For authoring tools, using px is fine and > common, since most information you get out of the CSSOM is in px. Well, I wouldn't say that you shouldn't ever use matrix (or matrix3d) but using them is very specialized, probably has a bunch of math backing up the final matrix values and therefore units wouldn't necessarily be relevant in these arguments. I just say this because I don't want these functions to have hurt feelings, thinking no one loves them :-) ----- ~Chris cmarrin@apple.com
Received on Friday, 10 February 2012 22:53:37 UTC