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

> On 16 Jul 2014, at 11:40 am, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
> 
> 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.

I still think it is pretty accurate and, actually, I was making the argument against Shane suggesting that this proposal is more simple. Since the existing behaviour will still apply, and we're adding rules to remember, it can't possibly be more simple. But anyway... let's see about "standard resetting".

What is the final transform here?

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

Am I overriding all of the shorthand? Just the translate longhand? None of it?

If we apply the other shorthand rules...

whatever {
  background: url(blah.jpg);
  background-repeat: repeat-x;
}

OK, I know about this. So "standard resetting" means I've only overridden the translate longhand of the shorthand. Cool.

Now I have:

whatever {
  rotate: 10deg;
  transform: translate(5px) rotate(20deg) translate(10px);
  translate: 20px;
}

Do I override just the first translate? The last? Both of them? Everything? None of them?

SIMPLE!

Dean

Received on Wednesday, 16 July 2014 01:56:16 UTC