Copy link to clipboard
Copied
I see from a post in 2018 that this wasn't possible. Is that still the case? I am trying to export the following icon as an SVG, maintaining the stroke as requested by the developer. It automatically rasterizes it if the gradient goes along the path. If the gradient runs across the shape as a whole it doesn't cause a problem.
1 Correct answer
SVG does only support gradient inside a stroke, not along or across. If the developer want the gradient along the stroke, then maybe like this: https://gist.github.com/mbostock/4163057
Explore related tutorials & articles
Copy link to clipboard
Copied
Hi. It's common to have problems with gradients when you export to SVG format. You can simplify the element or export it to another format like PNG.
Copy link to clipboard
Copied
SVG does only support gradient inside a stroke, not along or across. If the developer want the gradient along the stroke, then maybe like this: https://gist.github.com/mbostock/4163057

