Re: [css3-2d-transforms] Interop: matrix() values e,f <number> or <length>

On 11/29/10 10:18 AM, Chris Marrin wrote:
>> OK, what are they?  And again, I think allowing units in translate() but not in matrix() is really weird.  For one thing, I'm failing to come up with a self-consistent model of how transforms work in that world...
>
> If an element is present (in style, for instance), then we convert using that element. If we don't (as in the current CSSMatrix constructor) then we convert using some unit distance which is not well defined.

I guess I wasn't clear.  "What are they?" isn't a question about what 
implementations do; it's a question about what the spec should say. 
"some unit distance which is not well defined" is not a good answer 
there.  ;)

>>> This brings up a glaring problem with CSSMatrix. When you construct one, it is not associated with any element, so you can't use an element's style to convert units. Today, when we encounter the above CSSMatrix constructor I believe we just convert 50% to a value of 50 or something equally arbitrary. We should probably amend CSSMatrix to allow an element to be passed to the constructor. This brings up the next sticky issue of what happens when, for instance, the client size of the element changes. Do values in the CSSMatrix change? Madness!
>>
>> Agreed.  Why are we allowing percentages here again?  ;)
>
> In CSSMatrix? Why do we allow percentages anywhere?

We allow percentages in situations where there is a clear percentage 
basis, not "anywhere"....

-Boris

Received on Monday, 29 November 2010 15:27:29 UTC