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

Bug: Css scale style Property can be added as a unitlessNumber #26173

Closed
Biki-das opened this issue Feb 16, 2023 · 1 comment · Fixed by #25601
Closed

Bug: Css scale style Property can be added as a unitlessNumber #26173

Biki-das opened this issue Feb 16, 2023 · 1 comment · Fixed by #25601
Labels
Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug

Comments

@Biki-das
Copy link
Contributor

Biki-das commented Feb 16, 2023

we have scale property in css .

In Plain JavaScript, we can directly pass a Number type and change the scale value like below

const myDiv = document.querySelector('.div')
myDiv.style.scale = 2.5

scale:2.5 simulates the shorthand for transform: scale(2.5)

Similarly I tried to do the Above in React, but it does not work as of now and only can work with string, the fix i took is adding it as a unitless Number in the css.property.js file since it accepts the css properties accepting number , doing the same and running the fixtures standalone file , it is working the way as i expected

Before the changes

Untitled.1.mp4

After the changes

Untitled.2.mp4
@Biki-das Biki-das added the Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug label Feb 16, 2023
@Biki-das
Copy link
Contributor Author

cc @gaearon @gnoff

@eps1lon eps1lon linked a pull request Feb 16, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Unconfirmed A potential issue that we haven't yet confirmed as a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant