Re: [csswg-drafts] [css-transforms-2] Syntax of individual transforms should reflect general CSS syntax (#7646)

> I've always just enforced X - Y - Z and I don't think I've had a comment or complaint in almost ten years. 

If an author writes `.foo { rotate-y: 30deg; }`, it's reasonable to assume they expect it to rotate 30deg around the Y axis, aka the vertical line parallel with the page. But if another class has set `rotate-x: 45deg;`, they won't get that result - it'll rotate around the *45deg-canted Y axis* instead. That's pretty surprising! 

The existing TSR order doesn't result in such surprises - without knowing *anything* about what other transform properties are set, you can safely set any individual one and get the result you'd expect from thinking solely about that property in a vacuum - 'rotate' spins the element around regardless of what 'translate' is, 'translate' moves it the specified distance even if it's scaled or rotated, etc.

I think it's fairly useful to maintain this property if we can, and ask authors to write 'transform' if they do want transforms that are less "separable" in this way. It might not be a property we can maintain forever! But it's one we should discard only with caution, and with significant author benefit justifying it, to overcome the downside of author *confusion*.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7646#issuecomment-1745529978 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 3 October 2023 18:45:29 UTC