Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[css-properties] Improve individual transforms #9755

Closed
1aron opened this issue Dec 27, 2023 · 1 comment
Closed

[css-properties] Improve individual transforms #9755

1aron opened this issue Dec 27, 2023 · 1 comment

Comments

@1aron
Copy link

1aron commented Dec 27, 2023

https://drafts.csswg.org/css-transforms-2/#individual-transforms

translate

The translate property accepts 1-3 values, each specifying a translation against one axis, in the order X, Y, then Z.

Now we have translateX(), translateY(), translateZ(), does that mean we should also have:

  • Add translate-x: 16px instead of using translate: 16px
  • Add translate-y: 16px instead of using translate: 0px 16px
  • Add translate-z: 16px instead of using translate: 0px 0px 16px

Just like inset can be specified by top, left, right, bottom.

scale

The scale property accepts 1-3 values, each specifying a scale along one axis, in order X, Y, then Z.

Now we have scaleX(), scaleY(), scaleZ() does that mean we should also have:

  • Add scale-x: 2 instead of using scale: 2 1
  • Add scale-y: 2 instead of using scale: 1 2
  • Add scale-z: 2 instead of using scale: 1 1 2

rotate

The rotate property accepts an angle to rotate an element, and optionally an axis to rotate it around.

Now we have rotateX(), rotateY(), rotateZ() does that mean we should also have:

  • Add rotate-x: 30deg instead of using rotate: x 30deg
  • Add rotate-y: 30deg instead of using rotate: y 30deg
  • Add rotate-z: 30deg instead of using rotate: z 30deg

In addition, rotate has similar formats to translate and scale, providing the rotate: x 30deg syntax seems inconsistent.

@cdoublev
Copy link
Collaborator

See #7646.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants