Skip to main content
JackCA
February 4, 2021
Question

Transparent Filler Elements removed from SVGs

  • February 4, 2021
  • 12 replies
  • 6736 views

I’m trying to use “filler/dummy” elements to give dimensions to groups but they are always removed from SVG exports if I give them transparent fills or strokes.

For example, I’ve noticed that figma’s 3-point stars are not centered:

You’ll see that the star object is selected here, but the center of the bounding box is not in the correct place.

My strategy here is to add a blank square in the group so that the surrounding group has the correct center:

The problem here is that SVG exports are doing some sort of optimization to remove any shape that is not visible. If I had a stroke with a low opacity, the element is included in the export but I want to avoid that because that color can potentially be visible in the export.

The reason I’m doing all of this is so that animations I do on the shape are centered around the correct point. While the 3-point star being off-centered, is one problem, the main thing I’m looking to solve is the fact that this filler object is getting removed.

I have tried using the SVG Export plugin but it has the same issue, even without all of the SVGO optimizations turned off, so I believe it’s an issue further upstream.

This topic has been closed for replies.

12 replies

July 2, 2024

Hi. There is still no progress on this topic, right? I’m still experiencing it today.

Brian_Olson
Active Member
October 23, 2024

This is causing painful workflows for our org too. Please fix.