"Ignore overlapping layers" Export option is not respected in Slice export

I have a Design file that uses Slices to export component variants in different states (like on/off, light mode/dark mode). Previously, leaving the export option “Ignore overlapping layers” in the default “on” state resulted in exports that look like the Export Preview—in this case, an orange icon on a transparent field.

However after a recent change, my exports now show the background fill of the component in which the slice and variant are located, contrary to the Export Preview and experience with previous versions of Figma. This behavior is consistent with the Export Preview I see when I turn “Ignore overlapping layers” off.

At minimum, it seems like a bug that the Export Preview does not match the Export.

ignore off

Hey Nick, thanks for reaching out. I’ve checked internally, and I confirm this is an expected behavior. If this option is unchecked Figma includes any layers that intersect with the selected layer or group. (ie any layers placed above or below that component will appear in the export.)

Hi @Celine_Figma! The issue is when the box is checked I get the intersecting layers in my export. The top screenshot shows the Figma Export Preview showing the expected behavior, but the the resulting exported file (open in a macOS Preview window) shows a gray background which is unexpected.

Ignore overlapping layers checked → Export Preview is transparent → Exported file is opaque. This part is unexpected
Ignore overlapping layers unchecked → Export Preview is opaque → Exported file is opaque This part is expected

Hey Nick, thanks for the clarification!
Hmm this is odd. So I tested on my end => Ignore overlapping layers checked → Export Preview is transparent → Exported file is transparent
There is may be a bug in your file but it would be great to have a copy of your file so we can investigate it further. Please reach out directly to the support team here.
Be sure to use your Figma account email, (link this thread or sum up the steps you have done so far), include a link to the file, and share it with support-share@figma.com so they can take a closer look. Thank you!

1 Like

I wanted to close the loop in this thread! I reported this to the Figma Support team and this behavior was patched around February 13, 2024. Huge ups to the Figma Support and Engineering teams for the quick turnaround!

1 Like

Hey @Nick_Reynolds , thank you again for flagging this bug! We appreciate your feedback and we’ll share it to our team. Thank you :slight_smile: