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

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

From: Simon Fraser <smfr@me.com>
Date: Mon, 29 Nov 2010 08:14:53 -0800
Cc: Chris Marrin <cmarrin@apple.com>, www-style list <www-style@w3.org>
Message-id: <61FAB59C-48C0-44AA-92CE-5A1E8B8DF6A5@me.com>
To: Boris Zbarsky <bzbarsky@mit.edu>

On Nov 29, 2010, at 7:26 am, Boris Zbarsky wrote:

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

Indeed. And WebKit fails appropriately if you try to create a CSSMatrix with percentage units (I forget if it throws an exception or just returns the identity matrix).

Received on Monday, 29 November 2010 16:15:46 UTC

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