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

On Dec 1, 2010, at 11:40 AM, Boris Zbarsky wrote:

> On 12/1/10 2:37 PM, Chris Marrin wrote:
>>> 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.  ;)
>> 
>> Right. Do you have a good answer?
> 
> Not yet.  What are the use cases for a CSSMatrix that's not attached to an element?
> 
>> Now I think I was not being clear. When you construct a CSSMatrix, you can do it like this:
>> 
>> 	var m = new CSSMatrix("translate(50%, 25%)");
> 
> Why?  What would you do with it afterward?
> 
> How is this different from translate(1em, 1em), by the way?  That has the same issue, right?

Sure, any unit that needs to have an element to resolve into pixels would be affected. I think it would be useful to have this notation:

	var m = new CSSMatrix("translate(50%, 25%)", someElement);

This would give authors another tool to avoid having to rewrite JS when dimensions are changed.

-----
~Chris
cmarrin@apple.com

Received on Wednesday, 1 December 2010 19:46:59 UTC