Re: [css3-2d-transforms] "longhand" for the transform stack

On 29/03/2011, at 10:53 AM, Kang-Hao (Kenny) Lu wrote:

> (11/03/29 7:43), Dean Jackson wrote:
>> [snip]
>> 
>> I understand this, but the problem is that transforms don't really
>> work this way. As an author, you need to decide the order of transform
>> functions. If the specification decided one way, then there would be a
>> bunch of people who wanted it another way.
>> 
>> It might be possible to add three new properties that are applied
>> before the regular transform property. 'transform-scale' '-rotate'
>> '-translate'. This would probably address your need in the simplest
>> manner, and would be easy to implement. We'd define the order.
> 
> I think this is what David tried to propose in the earlier response not
> Aaron's idea 1), although I have two comments.
> 
> 1) I think these '-scale' and so on should happen after 'transform' as I
> think it is more intuitive that way, Any reason why these should happen
> before 'transform' ?

Yeah, see my response to Aaron. It doesn't really matter whether it is before or after, it will be confusing and error prone.

> 
> 2) The fact that these "longhand" work differently from other
> "longhand"s would probably confuse some people.

My main issue is that these are not longhand/shorthand properties. The properties that allow this form are not dependent on order. eg. you can set background position before or after you set the image. Transforms are not like that.

It's like asking a stranger where the nearest bathroom is. They'll answer something like "go out the door, turn left, walk to the end of the corridor, turn left again, the take the first door on the right". You can't decompose that into "take two left turns, use the first door on your right, then walk to the end of the corridor and go out the door" without making a messy mistake.

Dean

> 
> In light of this, what about a new property called "also-transform",
> which cascades separately and happens after "transform"? This idea can
> be extended to "also-background" and is sort of a solution to ISSUE-177,
> but as this looks ugly, I wouldn't say I really like this solution.
> 
> I think this might be a use case that the CSS Mixin module (if we create
> it) might want to address. A less uglier might look like "+transfrom:
> rotate(40deg)".
> 
> 
> Cheers,
> Kenny
> 

Received on Tuesday, 29 March 2011 19:12:29 UTC