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

[css3-transforms] Multiplication order

From: Simon Sapin <simon.sapin@kozea.fr>
Date: Sat, 10 Nov 2012 23:10:12 +0100
Message-ID: <509ED0C4.5000504@kozea.fr>
To: www-style list <www-style@w3.org>

css3-transforms recently got a change to specify more precisely the 
multiplication order of transformation matrices:


This is good, but still somewhat ambiguous: matrix multiplication is not 
commutative, A * B is not always the same as B * A.

§6 says:

> Multiply by each of the transform functions in ‘transform’ property from left to right

Is this a left-multiply or a right multiply? In other words, which of 
these is correct?

     accumulator = accumulator * to_matrix(function)
     accumulator = to_matrix(function) * accumulator

I remember trying stuff blindly and comparing with other engines in 
order to get this right in WeasyPrint…

Similar questions arise with nested "transformed" stacking contexts or 
anywhere an implementation would multiply matrices. It might just be me 
who is confused, but the spec could still be more explicit than it is 

Simon Sapin
Received on Saturday, 10 November 2012 22:10:41 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:23 UTC