W3C home > Mailing lists > Public > www-style@w3.org > January 2011

Re: webkit-transform translate values clipped to integers?

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Mon, 17 Jan 2011 20:40:59 -0500
Message-ID: <4D34EFAB.6000907@mit.edu>
To: Dan Clark <dclark@adobe.com>
CC: "www-style@w3.org" <www-style@w3.org>
On 1/17/11 8:25 PM, Dan Clark wrote:
> We have observed that
>     -webkit-transform: translate(14.95px, -12.95px) clips to integers. It is
> equivalent to
>     -webkit-transform: translate(14px,-12px).
> Is this expected? Is there any way top get translate to not clip the values?
> Is there any documentation on this behavior? Would using something besides
> px help?

Sounds like the usual webkit bug where all CSS lengths are clipped to 
integer pixels...  I admit it's particularly weird for transforms, 
though, since as you say the matrix() notation works fine.  On the other 
hand, maybe the length production parser in webkit is what does the 
integer thing?

The spec certainly says nothing about this behavior happening.

>    I can work around this issue by changing translate(14.95px, -12.95px) to
> matrix(1, 0, 0, 1, 14.95, -12.95). This gives us correct behavior but its
> not intuitive that translate isn't equivalent.

Translate is equivalent per spec....

-Boris
Received on Tuesday, 18 January 2011 01:41:33 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:36 GMT