feat: gradient units to userSpaceOnUse (#1644)

This commit is contained in:
Nick Lin 2022-03-19 16:57:58 +08:00 committed by GitHub
parent de80488f17
commit de05a574b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -123,8 +123,9 @@ class Card {
? `
<defs>
<linearGradient
id="gradient"
id="gradient"
gradientTransform="rotate(${this.colors.bgColor[0]})"
gradientUnits="userSpaceOnUse"
>
${gradients.map((grad, index) => {
let offset = (index * 100) / (gradients.length - 1);