Skip to content

Commit

Permalink
chore(svg): tweak warnning wording for unrecommended transparency value
Browse files Browse the repository at this point in the history
  • Loading branch information
plainheart authored Nov 11, 2024
1 parent f4ad697 commit 930de26
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/svg/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const mathRound = Math.round;
export function normalizeColor(color: string): { color: string; opacity: number; } {
if (process.env.NODE_ENV !== 'production') {
if (!color || color === 'none' || color === 'transparent') {
console.warn(`'${color}' is an illegal value for transparency in SVG, please use 'rgba(r,g,b,0)' instead.`);
console.warn(`'${color}' is not recommended value for transparency in SVG, please use 'rgba(r,g,b,0)' instead.`);

Check failure on line 20 in src/svg/helper.ts

View workflow job for this annotation

GitHub Actions / lint (18.x)

This line has a length of 125. Maximum allowed is 120
}
}

Expand Down Expand Up @@ -197,4 +197,4 @@ export const encodeBase64 = (function () {
}
return null;
};
})();
})();

0 comments on commit 930de26

Please sign in to comment.