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: Dean Jackson <dino@apple.com>
Date: Wed, 16 Jul 2014 10:49:40 +1000
Cc: www-style list <www-style@w3.org>
Message-id: <CE879F72-E188-4761-AD9C-82B9CD95261C@apple.com>
To: Dirk Schulze <dschulze@adobe.com>

> On 12 Jul 2014, at 4:22 pm, Dirk Schulze <dschulze@adobe.com> wrote:
> 
> While I acknowledge that it can happen that one writes translate:  or rotate:  accidentally, it is a mistake that can be figured out very quickly. Solving this is over engineering IMO. I am opposed to this proposal.

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.

However, do you think a new developer would instinctively know what happens here?

el {
  rotate: 10deg;
  transform: rotate(-20deg);
  translate: 10px;
}

That is certainly not simple. (And if you're not going to include all the 3d forms, then people will likely get into these situations... and if you do include them, does rotateY come before or after rotateX? - How do you remember the order of everything?)

Furthermore, the platonic property you're trying to modify is the transform. It's really all or nothing (with the disappointing issue of transform-origin as a pre+post transform). Splitting it up into sub-properties doesn't make sense. Longhands create a lot of authoring confusion, due to resetting.

Tab's impossible example is much better solved by allowing additive CSS animations i.e. two independent animations on the same property to combine with either addition or multiplication.

Lastly, I think transforms have been a pretty huge success, as have animations. I'm not sure this syntax issue is holding anyone back.

Dean
Received on Wednesday, 16 July 2014 00:50:16 UTC

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