Skip to main content
Antoine
Active Member
May 19, 2022 12:11 PM UTC

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

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. 

129 replies

Kharboush_Anton
Nov 1, 2023 10:16 AM UTC

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

Helge_Wadewitz
New Participant
Nov 8, 2023 11:11 AM UTC

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 🤣

Nov 14, 2023 7:45 PM UTC

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

Marcus_Tucker
New Member
Nov 16, 2023 10:54 AM UTC

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
Nov 16, 2023 3:19 PM UTC

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

Nov 21, 2023 8:23 PM UTC

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

Frederic_Giroux
New Participant
Nov 29, 2023 3:51 PM UTC

+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
Nov 30, 2023 8:30 AM UTC

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

Scott_Daly
Dec 7, 2023 11:54 PM UTC

+1, this is making me so sad 😦

Peter_Laxalt
Dec 11, 2023 6:57 PM UTC

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