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

lineHeight string interpreted as pixels #535

Closed
altano opened this issue Aug 28, 2023 · 1 comment · Fixed by #543
Closed

lineHeight string interpreted as pixels #535

altano opened this issue Aug 28, 2023 · 1 comment · Fixed by #543
Labels

Comments

@altano
Copy link

altano commented Aug 28, 2023

Bug report

Description / Observed Behavior

If you define lineHeight as the number 1, the number is interpreted as a unitless multiplier of the fontsize, as it should be. This is correct:

https://og-playground.vercel.app/?share=RZBPT8MwDMW_iuVzBWUaEorGbkjjDMde0sVrDGlSJS7dqPrdScpgx_d7_vPsGY_BECrcGf6CJBdHz_PceIBex469groqatDGsO_-5Cl4eeNvUtDgpt4M5wZXPrERW-BTXf9DS9xZKXT7eKOtPn52MYzeFGeyLHR1HHs6XHseMlmWxu-LcSDnAryC7iGFnkDoLCBWC3DKWyLdNX53nw_ZY4VhEA4-oZpxTYUqZ6rwNwyqbRGG2rFDddIuUYXUhw9-vwzlHTKtKs8pp770LRlUEkdaKhTd5gpbwkwhOoPLDw

If you define lineHeight as a string "1", the string is interpreted as "1px":
https://og-playground.vercel.app/?share=RZBPT8MwDMW_iuVzBWUaEorGbkjjDMde0sVrDGlSJS7dqPrdSQpsx_d7_vPsGY_BECrcGf6CJBdHz_PceIBex469groqatDGsO_-5Sl4eeNvUtDgpt4M5wZXPrERW-BTXV-hJe6sFLp9vNFWHz-7GEZvijNZFvpzHHs6XHseVrosjd8X80DOBXgF3UMKPYHQWUCsFuCUN0W6a_zuPh-zxwrDIBx8QjXjmgxVzlXhbyBU2yIMtWOH6qRdogqpDx_8fhnKS2RaVZ5Tzn3pWzKoJI60VCi6zRW2hJlCdAaXHw

Expected Behavior

I would expect Satori to match React behavior here, which treats both 1 and "1" as a unitless multiplier of the fontSize and NOT as 1px.

Reproduction

repro

Additional Context

Satori version, and any other context about the problem here.

@github-actions
Copy link

🎉 This issue has been resolved in version 0.10.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

sahithyandev pushed a commit to sahithyandev/satori that referenced this issue Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant