Skip to main content
Antoine
Active Member
May 19, 2022

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

  • May 19, 2022
  • 125 replies
  • 14039 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 for your continued feedback, and we apologize for the confusion caused by this!

As mentioned above, 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.

Again, the team’s original solution was more complicated than they originally anticipated. They will need more bandwidth and more heads to collaborate to get this working as expected.

Our team is still actively tracking this as a feature request and quality improvement for future prioritization. Rest-assured that every new comment is being added to our our open report to give this topic more visibility so that it can be pushed to the top of the team’s priority list.

We’ll be sure to provide an update as soon as we can, but also keep an eye out on our future releases .

125 replies

XavierV
Active Member
August 25, 2022

Hello, so is this a bug or not ? If not is there a new “idea” created to promote this feature somewhere ? It’s very annoying, the only way for me is to create a property to collapsed the empty frame and it’s very dirty… 😦

Edwin_Bradford
October 6, 2022

My understanding is Figma is meant to support design for frontend languages. Since collapsing to zero is exactly how frontend languages work (css) then shouldn’t that be the expected behaviour. I don’t have a lot of sympathy with it being “annoying” or “tedious”.

JonnyA
October 7, 2022

This is indeed a bug we discovered recently. Turning off all the child elements inside a group set to “Hug” should collapse the size of that group to 0px but it doesn’t. @figma please fix this so we can still use our magic properties!

Jen_Heiner
December 6, 2022

Also running into this issue. Will need to use variants instead of booleans 😦

hosley
March 13, 2023

There’s probably a good reason for not fixing this, but in the meantime it’s incredibly frustrating and means that I end up needing to hack in various ways (add another boolean to the container?) instead of just having this behave logically.

Madness 😦

Stan5
New Participant
March 27, 2023

This has to be a bug, it breaks slotting which is a super important design system technique

Mira_Geborska1
April 12, 2023

Struggling with the same. I would expect the group set to HUG, to have 0px if all it’s children are hidden. It makes it so painful to create components with boolean properties right now.

Pedro_Vinagre
May 4, 2023

Any updates on this?

Andrea_Crouch1
May 17, 2023

+1 - I would expect the parent contain with auto-layout applied to have a width or height of 0 if all children are hidden.

Averyy
May 24, 2023

Yep this is making booleans frustrating.

CSS collapses to 0, so autolayout should as well. The 0px shape/frame workaround doesn’t work as it requires a 1px minimum height.