Re: [csswg-drafts] [css-transforms-2] `scale` property behavior differs from `scale()` function

> Would it be possible to have scale: 3 expand to scale: 3 3 3? If the current z-axis position (and z-axis transform origin) is 0, scaling it has no effect. Except if it then upgrades to "3D transform" mode and causes complications that way.

I spoke to @mattwoodrow about this:

> Our current behaviour is to force an active layer if the resulting transform contains any sort of 3d components, so expanding it to 'scale: 2 2 2' would be a regression for us. It's fairly easy to change that, but harder to know if any web content is depending on the behaviour.
>
> If I recall correctly blink does something similar, but instead uses the presence of 3d transform function (scale3d, transform3d etc), regardless of what the values passed are. They could probably go either way, depending on how they interpret 'scale: 2 2 2'.

So it sounds like it would be some work to make `scale: 2` expand to `scale: 2 2 2` and I wonder if it is worthwhile (I would be glad to be told otherwise though!). Matt also asked if it makes sense to introduce a separate `scale3d` property.

> If that's the case (complications from switching to 3D mode), the default should be as @birtles proposed, and have a single value behave the same as the scale() function.

I (unsurprisingly) still think this is the preferred behavior here.

CC: @mstange

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

Received on Monday, 22 January 2018 04:59:30 UTC