-
Notifications
You must be signed in to change notification settings - Fork 46.9k
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
Inline style with 0 value doesn't add "px" #2721
Comments
It's a bit weird, but I guess it is on purpose. MDN has this: The length unit is optional after the 0. In the react code the 'px' is not added if It's weird because the string |
Thx for the answer. I think I can close, I have the answer for the "why". |
Maybe updating the docs ? |
Hello,
The docs say :
When specifying a pixel value for your inline style prop, React automatically appends the string "px" for you after your number value
.But not for 0 (the number). On purpose ?
The text was updated successfully, but these errors were encountered: