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

Linear gradient is scaled by background image size #163

Closed
nexxeln opened this issue Oct 11, 2022 · 3 comments · Fixed by #179 or #448
Closed

Linear gradient is scaled by background image size #163

nexxeln opened this issue Oct 11, 2022 · 3 comments · Fixed by #179 or #448
Labels
bug Something isn't working released

Comments

@nexxeln
Copy link

nexxeln commented Oct 11, 2022

Bug report

Description / Observed Behavior

When using linear gradient in backgroundImage, there's an error.

backgroundImage:
            'linear-gradient(#222222 1px , transparent 1px ),linear-gradient(to right, #222222 1px , transparent 1px )',
Cannot read properties of undefined (reading 'type')

Expected Behavior

Linear gradient should work.

Reproduction

Reproduction link.

Additional Context

0.0.15

@nexxeln
Copy link
Author

nexxeln commented Oct 12, 2022

Hey! It doesn't thrown an error now but still doesn't seem to work.

Reproduction link

If you look at the html native output you can see the background-image is working there but not in the satori output. Am I doing something wrong?

@shuding
Copy link
Member

shuding commented Oct 12, 2022

Ah that's another bug caused by background-size, I'll reopen this.

Temporary workaround is to multiple 1px by div_size / background_image_size. So vertical lines become 1200/100 = 12px and horizontal lines become 630/100 = 6.3px: example

@shuding shuding reopened this Oct 12, 2022
@shuding shuding changed the title linear gradient doesn't work Linear gradient is scaled by background image size Oct 12, 2022
@shuding shuding added the bug Something isn't working label Oct 12, 2022
@github-actions
Copy link

🎉 This issue has been resolved in version 0.4.10 🎉

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
bug Something isn't working released
Projects
None yet
2 participants