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
  • 14210 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

Alamaki
May 16, 2024

Annoying, but at least it’s easy to work around with a transparent 1px width/height frame in the autolayout.

Diana_Tatarenko
May 29, 2024

Please fix this. It’s making the use of auto-layout and boolean props impossible to use with complex components.

Stephon_Odom
New Member
June 12, 2024

Still struggling with the same issue of auto layout not fully collapsing when all of the layers within it have been hidden. Eager to see what solution is ultimately created by the Figma team 👀.

Joe_Cloughley
New Participant
June 24, 2024

+1. I am struggling with this issue.

Bert_Selleslagh1
July 3, 2024

+1 also struggling with this still.

lx-zd
July 21, 2024

+1, please fix

Jeremy_Knudsen
Active Member
July 23, 2024

If you use the Line tool and draw a line with a transparent stroke (do not draw a 1px rectangle as a line), then it should collapse to 0px since lines drawn with the Line tool don’t occupy layout space.

Tascha
Active Member
July 23, 2024

just dropping in to say this issue still persists… After 1 year with many people having that issue 😢
(0 width object hack luckily is still working tho… (0 width item has to be set to visible with 0 opacity to work & look properly))


Shirley_Wang1
New Member
August 12, 2024

Hi all, seems like the bug is not fixed yet, so I too am keeping it alive.

So anyways if anyone need some help, @Tascha 's 0 pixel 0 opacity object is the only workaround