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

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