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

HTML to JSX doesn't respect pixels on line-height #330

Open
zomars opened this issue May 30, 2022 · 3 comments
Open

HTML to JSX doesn't respect pixels on line-height #330

zomars opened this issue May 30, 2022 · 3 comments

Comments

@zomars
Copy link

zomars commented May 30, 2022

This html:

<p style="line-height: 6px;">
  This should translate to "lineHeight: '6px'"
</p>

Translates to:

<p style={{ lineHeight: 6 }}>
  This should translate to "lineHeight: '6px'"
</p>

When line-height: 6px is not equivalent to line-height: 6 which both are valid values for line-height.

@zomars
Copy link
Author

zomars commented May 30, 2022

I see that this behavior is coming from upstream.

@zomars
Copy link
Author

zomars commented May 30, 2022

It seems that this was already fixed upstream but a new release wasn't provided: https://magic.reactjs.net/htmltojsx.htm

@ritz078
Copy link
Owner

ritz078 commented Feb 25, 2023

There is a new version of website in works that fixes multiple issues like this. Since it's a rewrite from scratch, cherrypicking will not help.

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