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 11:55:42 +1000
Cc: Shane Stephens <shans@google.com>, Dirk Schulze <dschulze@adobe.com>, www-style list <www-style@w3.org>
Message-id: <2EAB6B2C-A413-4FE5-8C20-6A0DF2F3E1D7@apple.com>
To: "Tab Atkins Jr." <jackalmage@gmail.com>

> 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

This archive was generated by hypermail 2.4.0 : Monday, 23 January 2023 02:14:42 UTC