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

> 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