Re: [css3-2d-transforms] Unit for e and f in matrix(a,b,c,d,e,f)

I would vote for 1. It's strange that the first 4 values are unitless but
not the last 2/

Rik

On Wed, Feb 8, 2012 at 3:02 AM, Simon Fraser <smfr@me.com> wrote:

> This has been raised a number of times:
> <https://www.w3.org/Bugs/Public/show_bug.cgi?id=15628>
> <http://lists.w3.org/Archives/Public/www-style/2009Oct/0360.html>
>
> and is on the F2F agenda for today.
>
> Simon
>
> On Feb 8, 2012, at 11:39 AM, Simon Sapin 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.
> >
> >
> > Quick test: (prefix as appropriate and change the 5em value)
> >
> > data:text/html,<div%20style="transform:matrix(1,0,0,1,0,5em)">Hello
> >
> > Chromium 16 only accepts <number> and reads it as 'px'. Firefox 10
> accepts both <number> (as px) and <translation-value>.
> >
> >
> > I think one of these should be done:
> >
> > 1. Keep e and f as unit-less numbers in the syntax, but specify that
> they are interpreted as length in some specific unit. Choosing the 'px'
> unit would be most consistent with SVG.
> >
> > 2. The syntax for matrix() is changed to take explicit units:
> >
> >    matrix(<number>, <number>, <number>, <number>,
> >           <translation-value>, <translation-value>)
> >
> > 3. Both: make the syntax something like <number> | <translation-value>
> for e and f, and specify the unit for <number>.
> >
> >
> > Regards,
> > --
> > Simon Sapin
> >
>
>
>

Received on Wednesday, 8 February 2012 18:55:30 UTC