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

Re: [css3-transforms] Multiplication order

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 12 Nov 2012 09:36:48 -0800
Message-ID: <50A133B0.8040206@mit.edu>
To: Dirk Schulze <dschulze@adobe.com>
CC: "www-style@w3.org" <www-style@w3.org>
On 11/12/12 8:39 AM, Dirk Schulze wrote:
>> Simon's point is that "multiply" can be done in two different ways and
>> the spec does not actually clearly define which way to use.
>
> The specification describes the behavior, it doesn't say how it should be implemented. This is up to the UA which needs to match the behavior. But if it helps to understand the principles, I am happy to adapt the section "Nested Transform"[1] from SVG 1.1 into the "The Transform Function Lists"[2] section for the example in this section.

The problem isn't with "The Transform Function Lists".  That part of the 
spec is just fine.  The problem is with the normative text in 
http://dev.w3.org/csswg/css3-transforms/#transform-rendering where it's 
defining "transformation matrix".

>> Sort of.  I still think the text in section 6 should be more explicit
>> about the multiplication instead of relying on other parts of the spec
>> to actually explain what it means.
>
> That is what I meant. It actually does. It says you should multiply the transform functions of the transform property from left to right to get the transformation matrix.

The problem is that the word "multiply" is ambiguous here.

> Or is it the point that it does not say how to get to the accumulated CTM? This was the intention of the section "The Transform Function Lists".

There is no problem with getting the accumulated CTM.  The problem is 
that there is normative text in step 3 of the "transformation matrix" 
definition that is ambiguous... (actually, step 4 is slightly as well, 
but it's less of a problem).

> If not I would be happy to get more feedback how to change the section.

I would suggest changing step 3 of the above steps to something like this:

3.  Multiply on the right by the product of the matrices corresponding 
to the transform functions in the 'transform' property, in the order 
they are given.

or something along those lines.  I _think_ this is correct; I haven't 
triple checked the left vs right in there.  Might be worth doing that.

-Boris

P.S.  Does transform-origin define somewhere how 
left/right/top/bottom/center map into percentages?  It's obvious how it 
should work, but I can't find where it comes out and says it...
Received on Monday, 12 November 2012 17:37:19 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:21:02 GMT