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

On 07/11/2014 11:42 AM, Tab Atkins Jr. wrote:
> Earlier today I saw a Twitter thread started by Lea
> <> 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).
> Since this is something that devs trip over so much, it might be worth
> accommodating it in the syntax.  I think we can do this compatibly
> with the current syntax.  Here's a proposal:

Having read the thread so far, I think this is a problem worth solving.
However, I agree with most of Dirk's and all of Sylvain's comments, so
I'm in support of a proposal that incorporates their feedback.

On that note, if there needs to be separate origins for the longhands,
they should not be handled as origin() functions as you propose [1],
since you generally want to cascade the origin and the value independently.

An origin() function might be useful for translate-list, however, to
avoid the awkward translate-untranslate pattern Dirk mentions [2].


Regardless, this should almost certainly go into a Transforms Level 2
draft, since the set of features in Level 1 has already shipped. To
that end, it would be nice to have Transforms in CR sometime soon. :)


Received on Monday, 14 July 2014 07:23:52 UTC