Skip to main content
Antoine
Active Member
May 19, 2022

"Empty" Auto Layout Frame keeps the size of last hidden child

  • May 19, 2022
  • 128 replies
  • 14208 views

Hi, I’m not sure if this is new since the May update, but I wonder why “empty” (all elements hidden) Auto Layout Frames keep the size of the last hidden child (and I do not mean last in the list, but the last element to have been toggled out of view by the user), making them not-0px high even with nothing in them.

See here a file with a Frame with three hidden rectangle: the Frame keeps the size of the last child rectangle to have been hidden. When adding a 0-px Frame to the AL frame, and toggling this 0-px Frame off last, the container goes 0-px.

In my opinion, empty AL Frames should have a height of 0. What do you think?

Pinned Reply By djv

Hey All, thanks again for your continued feedback, and I finally have an update!

 

As mentioned previously, this is behavior is currently a known feature limitation in Figma. We do not allow Auto layout frames to collapse to 0 when the child layers are hidden, so it is expected that the frame will remain sized as if they were shown.

The team has confirmed that they now have the bandwidth to get this working as expected. In the meantime, they have a temporary solution: Add a visible zero-sized frame. Since the container is then not empty, it will hug to the visible child, which is zero-sized.

 

While I know this may not be the solution you want, please know that we’re getting closer. I’ll be sure to update you all again once we have a more firm timeline on the fix. 

128 replies

Kharboush_Anton
November 1, 2023

Just to bump, as it’s still not fixed. We need this.

Helge_Wadewitz
New Participant
November 8, 2023

Ran into the same issue, still not fixed.
FigJam has AI features now, but we struggle with containers that don’t resize if they are empty 🤣

November 14, 2023

Still experiencing this issue on our components and unable to use a 0px object either.

Marcus_Tucker
New Member
November 16, 2023

Can confirm this is a problem we’re encountering with multiple components in our design system, seems obvious that a frame with dimensions set to “hug” should shrink whenever any of its contents are hidden, including the last child, and when all of its contents are hidden it should shrink to zero in the hug dimension(s). Please make it so.

Celestine
New Participant
November 16, 2023

+1. Cant find any workaround, should be possible to collapse to zero

November 21, 2023

+1 Thanks for reporting this! Seems like an obvious bug.

Frederic_Giroux
New Participant
November 29, 2023

+1 to all the above comments. I would even tend to add that the auto-layout frame having all child hidden should also be hidden. Reason being if this frame is within another auto-layout frame with spacing between them, the spacing would remain even though one is empty with a 0px height.

There would probably have tweak around even without this addition, but it would probably make our life easier.

Nicolas_Combes
New Member
November 30, 2023

Same here, having the same issue and need… Thanks for looking into it Figma!

Scott_Daly
December 7, 2023

+1, this is making me so sad 😦

Peter_Laxalt
December 11, 2023

+1. Currently using the 0px Frame hack as a workaround.