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

Re: [css-transforms] Making 'transform' match author expectations better with specialized 'rotate'/etc shorthands

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Tue, 15 Jul 2014 18:40:07 -0700
Message-ID: <CAAWBYDCmTzdgVx_cioKtMe-P5T3YPhtsYkj78gbfVHhE5dUsVg@mail.gmail.com>
To: Dean Jackson <dino@apple.com>
Cc: Shane Stephens <shans@google.com>, Dirk Schulze <dschulze@adobe.com>, www-style list <www-style@w3.org>
On Tue, Jul 15, 2014 at 6:29 PM, Dean Jackson <dino@apple.com> wrote:
> On 16 Jul 2014, at 11:13 am, Shane Stephens <shans@google.com> wrote:
>> FWIW I oppose this proposal as well. I think it will be more confusing, if
>> *only* because people will have to remember the transform order. I
>> understand that some people will think it is simpler, because in their cases
>> they will only need to write one of the functions e.g. rotate.
> I think this proposal will be *less* confusing, based on the experience of
> library vendors like GSAP.
> So, which of the following is less confusing?
> A. transform applies the list of functions in the order they are written.
> B. You can write all of the core 21 transform properties in any order you
> like, as well as a transform longhand, to create a transform-list value. The
> individual properties are combined in the order of ...... well, translates
> happen before scales, which happen before rotations... and 2d things happen
> before 3d things (even if the 3d thing is really just a 2d thing), and Xs
> come before Ys come before Zs (or do they, since rotateZ is just 2d??), and
> perspective... I guess that comes last. Skews, they come... somewhere. Oh,
> but if you put a transform in there, it will reset all of the individual
> properties that came before it. And if you put individual ones after the
> transform, then it will .... I guess it won't reset the transform because
> then it wouldn't be like normal longhands, so maybe it adds to it? But I'm
> now not sure if the individual ones apply before the transform rule or after
> it.... OMG.

This is a misreading even of my full original proposal, btw.  It
contained 14 longhands for handling all aspects of 3d transformation,
and the properties corresponding to the 2d functions were shorthands
for some of those.

And perspective comes first, as it does today, because it has to if
you want it to work right.  I detailed this in my proposal.  (Or if I
misread the spec and it actually gets applied last, then it does the
same here.  Whatever.)

The ordering of some aspects of it (notably the 3d rotates) were
arbitrary, but as far as I can tell, all the rest were specified in a
way that made them intuitively act "independently".  There's no need
to memorize anything, except that 'transform' is now a shorthand and
does the standard resetting thing.  Your casting of it as an
impossible-to-remember mess is inaccurate.

Received on Wednesday, 16 July 2014 01:40:55 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:39:23 UTC