Skip to main content
Question

Auto Layout Bug: Negative gap with zero width element falls back to zero


Gustav Neustadt

Hi Figma team,

I’ve encountered an unexpected behavior when using Auto Layout with negative gaps. When a zero-width or height element is included in the frame, the negative gap is ignored, and spacing defaults to 0.

Steps to Reproduce:

  1. Create an Auto Layout frame with a horizontal or vertical direction.

  2. Add multiple regular elements (e.g., rectangles) — negative gaps work as expected.

  3. Add a zero-width or zero height element into the same Auto Layout group.

  4. Suddenly, the negative gap no longer works — the spacing defaults to 0, breaking the layout.

 

Would appreciate if this could be looked into.

Thanks!

 

Changing the gap reveals that only the Auto layout frames without the zero size element are able to have a negative gap value

 

2 replies

Gustav Neustadt

Okay, I assume this is how it works at the moment, and there might be some functional constraints preventing it from behaving the way I want. This example shows how it works with elements of different sizes.

 

 


Tom Reem
Figmate
  • Figmate
  • 224 replies
  • July 15, 2025

Hey ​@Gustav Neustadt — welcome to Figma Forum, and thank you for bringing this up!

I really appreciate the level of detail you shared with the steps and images. This post reminds me of a similar behavior discussed in another thread by a few members. You might find Alice’s reply there helpful in clarifying what you’re encountering: Customize "Fixed width" of the nested instance — let me know if that’s useful for the scenario you’ve illustrated here.

I tested this behavior on my end, and from what I can tell so far, I suspect there may be a reason it’s designed to function this way. For example, in some cases, negative value gaps might not produce the desired outcome in certain designs or prototypes.

That said, I want to make sure I have more context before looping in the product team. Could you share a bit more about how this impacts your workflow? For instance:

  • Is it affecting a specific design, prototype, or interaction?
  • Is it preventing you from achieving a particular layout or effect?
  • Is it creating extra manual work to get things behaving as expected?

Getting a little more on the “why” behind your setup will help me surface this to the right team members and guide the conversation.

Thanks again for taking the time to flag this — I’m looking forward to hearing more! 🙏🏻


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings