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

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

From: Simon Sapin <simon.sapin@kozea.fr>
Date: Wed, 08 Feb 2012 11:39:51 +0100
Message-ID: <4F3250F7.8030309@kozea.fr>
To: www-style@w3.org

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:

 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)


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>.

Simon Sapin
Received on Wednesday, 8 February 2012 10:43:22 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:55 UTC