diff --git a/src/svg/helper.ts b/src/svg/helper.ts index c8eaa2b8..893592f6 100644 --- a/src/svg/helper.ts +++ b/src/svg/helper.ts @@ -16,7 +16,7 @@ const mathRound = Math.round; export function normalizeColor(color: string): { color: string; opacity: number; } { let opacity; - if (!color || color === 'transparent') { + if (!color) { color = 'none'; } else if (typeof color === 'string' && color.indexOf('rgba') > -1) { diff --git a/test/svg-gradient.html b/test/svg-gradient.html new file mode 100644 index 00000000..b846acc1 --- /dev/null +++ b/test/svg-gradient.html @@ -0,0 +1,39 @@ + + +
+ +