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

Re: [css-transforms] Transform functions should accept percentages

From: Dirk Schulze <dschulze@adobe.com>
Date: Fri, 21 Nov 2014 19:10:43 +0000
To: Boris Zbarsky <bzbarsky@MIT.EDU>
CC: Tab Atkins Jr. <jackalmage@gmail.com>, www-style list <www-style@w3.org>
Message-ID: <43D2162C-23B9-41C8-AC96-053DEEFB0F17@adobe.com>
Hi Boris,

This seems to be indeed the case. Must have been an oversight. I’ll add it to the spec after Thanksgiving.

Percentage values probably should be relative to the reference box specified by ’transform-box’[1] which we added after TPAC. This would solve your SVG case as well. The default differs for HTML elements and SVG elements.


[1] http://dev.w3.org/csswg/css-transforms/#transform-box

On Nov 21, 2014, at 7:42 PM, Boris Zbarsky <bzbarsky@MIT.EDU> wrote:

> On 11/21/14, 1:36 PM, Tab Atkins Jr. wrote:
>> On Fri, Nov 21, 2014 at 7:41 AM, Boris Zbarsky <bzbarsky@mit.edu> wrote:
>>> For example, http://dev.w3.org/csswg/css-transforms/#funcdef-translatey
>>> says:
>>>   translateY() = translateY( <length> )
>>> But in implementations, translateY accepts a length or a percentage.
>> And it's relative to, iirc, the width of the element's border box.
> "It's complicated."  The testcase I was looking at that led me here was applying a percentage translate on an svg:path, for which it's not relative to the (nonexistent) border box.  But in any case, what it's relative to is defined in the transforms spec.  It's just claimed to not be possible.  ;)
> -Boris
Received on Friday, 21 November 2014 19:11:14 UTC

This archive was generated by hypermail 2.4.0 : Friday, 25 March 2022 10:08:48 UTC