You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
svgo combines multiple shapes sharing the same <linearGradient> into a single <path>. This happens in the mergePaths plugin, and visually changes the result since the gradient stops are relative to the bounding box of the shape to which the gradient is applied (with the default gradientUnits="objectBoundingBox").
Input
<svgxmlns="http://www.w3.org/2000/svg"viewBox="0 0 300 100">
<linearGradientid="gradient">
<stopoffset="0"stop-color="#ff0000" />
<stopoffset="1"stop-color="#0000ff" />
</linearGradient>
<pathfill="url(#gradient)"d="M 0 0 H 100 V 100 H 0 z" />
<pathfill="url(#gradient)"d="M 200 0 H 300 V 100 H 200 z" />
</svg>
svgo combines multiple shapes sharing the same
<linearGradient>
into a single<path>
. This happens in themergePaths
plugin, and visually changes the result since the gradient stops are relative to the bounding box of the shape to which the gradient is applied (with the defaultgradientUnits="objectBoundingBox"
).Input
Output
(Indentation restored for clarity.)
The text was updated successfully, but these errors were encountered: