W3C home > Mailing lists > Public > www-style@w3.org > February 2012

Re: [CSS-transforms] rotate(<angle>[, <translation-value>, <translation-value>])

From: Chris Marrin <cmarrin@apple.com>
Date: Fri, 17 Feb 2012 09:52:45 -0800
Cc: Dirk Schulze <dschulze@adobe.com>, Rik Cabanier <cabanier@gmail.com>, "L. David Baron" <dbaron@dbaron.org>, www-style list <www-style@w3.org>
Message-id: <EC8AD71C-C8BB-451A-94CC-6757F550B2CC@apple.com>
To: Aryeh Gregor <ayg@aryeh.name>

On Feb 17, 2012, at 7:59 AM, Aryeh Gregor wrote:

> On Thu, Feb 16, 2012 at 5:14 PM, Dirk Schulze <dschulze@adobe.com> wrote:
>> Well, the initial value would be rotate(0,0,0). Therefore no. If you want to
>> always have the animation around (10,10) , you would need to define it in
>> 'from'.
> I suggest that if the extra two arguments are left in the spec (which
> I'm still not a fan of), an extra special case be added to the
> transitions part so that it works as expected.  Transitioning from
> 'none' to rotate3d(0, 0, 1, 45deg) rotates only around the z-axis as
> expected, and transitioning a color from green to transparent
> shouldn't make it black in between even though you're technically
> going from rgba(0, 128, 0, 1) to rgba(0, 0, 0, 0).  Likewise,
> transitioning from none to rotate(45deg, 10px, 10px) should be treated
> like transitioning from rotate(0deg, 10px, 10px).  Anything else is
> not expected, IMO.

And that, I think, is the problem with having origin parameters in the rotate function. In rotate3d, the axis and angle are inseparable. You need both to have a complete description of a rotation. That's not the case for the origin parameters in the rotate() function. rotate(45deg, 10px, 20px) is simply shorthand for translate(10px, 20px) rotate(45deg) translate(-10px, -20px). If I transitioned from none to translate(10px, 20px), I'd start at 0,0. Special casing the translation values embedded in the rotate function seems strange.

Received on Friday, 17 February 2012 17:56:09 UTC

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