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

Multiple text-shadow is a parsing error #328

Closed
Schniz opened this issue Dec 1, 2022 · 1 comment · Fixed by #436
Closed

Multiple text-shadow is a parsing error #328

Schniz opened this issue Dec 1, 2022 · 1 comment · Fixed by #436
Labels
bug Something isn't working released

Comments

@Schniz
Copy link

Schniz commented Dec 1, 2022

Bug report

Description / Observed Behavior

When trying to use multiple text-shadow values, Satori reports a parsing issue:

<span
  style={{
    // do a stroke around the text
    textShadow: `0 0 0.1em black, 0 0 0.1em black, 0 0 0.1em black, 0 0 0.1em black`,
  }}
>
  {text}
</span>

results in

Error: Failed to parse declaration "textShadow: 0 0 0.1em black, 0 0 0.1em black, 0 0 0.1em black, 0 0 0.1em black"

Expected Behavior

We should be able to set multiple text-shadow values, especially to allow to have a stroke around the text.

Reproduction

https://og-playground.vercel.app/?share=XVJNT7NAEP4rkzFvesF2tZS-bmoPfiR68KSJFy60O8DqwhJYWmrT_-4siFEPwDzPw-wzH3vErVWEEldK7-ISoHEHQ9fHo48BctJZ7iRMLoT4NwkGcq-Vy_9wSjeVSQ7Mpoa6kfXxna5p67QtWdta0xblqCZGZ-Wjo6LxEpWO6lF6axun08OtZbL0_r_lTbJ9z2rblurWGluzfpam6bcrZz3rD5Iwv_xBvX71EgnRs6dTXK59sGp22Y_OrmNcLmIcmJ2m_Y3tmBMgYLmA6FtKtTHMnwkhRmocHhRJnWnfsc-puklvBtDbsWGVuBwUJz_Nl9PF1fRyYebR9IpPDx-mUTiA8yj8iHG9mvm_h0JnXOkQ8bb-ur3YSkIoAnDUuec8UXYvIcaLqgP_1KQCOPdR_-rhb9RHXyhGLnn9QMbYAF5tbdRqxp5sPn4xQFv5vTYoj9hPDuV_ni0OlwZl6IGiTZuhTBPTUIBU2Df9cqj8jXP7HvE5fjv3xYYUSle3dDp9Ag

<div
  style={{
    height: '100%',
    width: '100%',
    display: 'flex',
    flexDirection: 'column',
    alignItems: 'center',
    justifyContent: 'center',
    backgroundColor: '#fff',
    fontSize: 32,
    fontWeight: 600,
  }}
>
  <svg
    width="75"
    viewBox="0 0 75 65"
    fill="#000"
    style={{ margin: '0 75px' }}
  >
    <path d="M37.59.25l36.95 64H.64l36.95-64z"></path>
  </svg>
  <div style={{ marginTop: 40, textShadow: "1px 1px red, -1px -1px red, 1px -1px red, -1px 1px red" }}>Hello, World</div>
</div>
@shuding shuding added the bug Something isn't working label Dec 4, 2022
shuding added a commit that referenced this issue Apr 7, 2023
shuding added a commit that referenced this issue Apr 7, 2023
@github-actions
Copy link

github-actions bot commented Apr 7, 2023

🎉 This issue has been resolved in version 0.4.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

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
Development

Successfully merging a pull request may close this issue.

2 participants