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

Should there be scale-x and scale-y? #16

Open
joeldbirch opened this issue Oct 5, 2019 · 3 comments
Open

Should there be scale-x and scale-y? #16

joeldbirch opened this issue Oct 5, 2019 · 3 comments

Comments

@joeldbirch
Copy link
Contributor

As per subject line. I often use scale-x and scale-y separately. I suppose an alternative to adding more placeholders (if that's a concern) could be to replace the existing scale classes with scale3d behind the scenes, which would allow users to set custom properties with access to all scale axes.

PS. I notice skew is missing also.

@stowball
Copy link
Owner

stowball commented Oct 5, 2019

@joeldbirch Can you give me some use-cases for only wanting to scale 1 axis?

You can always use the existing scale class as you suggest for scale3d too like so:

$hu-scale-modules: (base);

$hu-scale-types: (
  x1_5y1_3: (1.5, 1.3),
  varXvarY: (var(--x), var(--y)),
);

-> 

.scale\:x1_5y1_3 {
  transform: scale(1.5, 1.3) ;
}

.scale\:varXvarY {
  transform: scale(var(--x), var(--y)) ;
}

Does anyone use the z axis?

@joeldbirch
Copy link
Contributor Author

joeldbirch commented Oct 5, 2019 via email

@stowball
Copy link
Owner

stowball commented Oct 5, 2019

scale only accepts 2 values. It doesn't accept the Z axis like scale3d does. I reckon that should be fine for 99% of cases.

scale3d could be another core placeholder class, or it could be a good candidate for a plugin

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

No branches or pull requests

2 participants