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: Sun, 13 Jul 2014 15:27:16 -0700
Message-ID: <CAAWBYDD8DGA-mFwZC1nuovrqZfNz3f=EtdGGQDz8OSJqNQma9w@mail.gmail.com>
To: Simon Fraser <smfr@me.com>
Cc: www-style list <www-style@w3.org>
On Sun, Jul 13, 2014 at 10:32 AM, Simon Fraser <smfr@me.com> wrote:
> On Jul 11, 2014, at 11:42 am, Tab Atkins Jr. <jackalmage@gmail.com> wrote:
>> Earlier today I saw a Twitter thread started by Lea
>> <https://twitter.com/LeaVerou/status/487350702386479105> about how she
>> commonly accidentally types the name of the transform she wants as the
>> property (like "rotate: 45deg;") and then has to go back and correct
>> it afterwards.  Several other devs chimed in that they do this as
>> well, and I know that I've done it a few times (especially when using
>> SVG - I use "transform='translate(...)'" so often that I commonly try
>> to name the attribute "translate" first).
>> …
>> Thoughts?
>
> This doesn’t seem very future-compatible with a variant of CSS transforms that affect layout (which, with the current syntax, could easily be added with a different property name).

There are other ways to do layout-affecting transforms, for example -
we could do it with an initial keyword on 'transform', in which case
we'd add a longhand property that the keyword toggles.

Or, since layout-affecting transforms are a *much* smaller set of
transforms (only 2d, I think only rotate/scale/skew?), we could just
break the new property apart in the same way; it wouldn't be nearly as
many properties added to do so.

Or we could just say that layout-affecting transforms don't have this
kind of shorthand behavior.

It all depends on the proposal.  If you're planning on doing
layout-affecting transforms, please propose it and we can figure out
what to do.  ^_^

~TJ
Received on Sunday, 13 July 2014 22:28:04 UTC

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