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

Christian5
New Member
September 9, 2024

Your idea worked and helped me a lot, thank you!! 🙏 @Klesus

drewbeck
New Participant
September 16, 2024

I’m having this issue even with AL frames with padding and/or min height set, both of which would intuitively prevent frames from collapsing to 0 height/width! I should fully be able to make an empty AL frame with padding that hugs its contents, but … I cannot.

Really annoying!

One of the hardest parts is that the UI doesn’t update – it still says “hug” for the height even though it’s “hugging” around a non-existent child element. At minimum the UI should update to make this more clear – switch it to “fixed” and prevent me from choosing “hug” unless there’s children. That would suck but at least it would be clear that something is happening.

Paul_Nattress
New Member
September 26, 2024

Also encountering this as an issue. I have elements stacked vertically in an auto-layout. I’d like to have a boolean to show/hide an element but Figma doesn’t collapse the height of a component so the empty space still shows when the boolean is turned off. I’d expect it to collapse. Fixed height / hug should allow the designer to dictate whether it collapses or not.

djv
Figmate
Community Support
September 27, 2024

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 .

Daniel_Shipley
September 30, 2024

Thanks @dvaliao!

I just want to comment to keep focus this to the degree that I can because it’s just so important to get this release.

Thomas_Tom-B
New Member
October 7, 2024

Same here, we shared our struggle as Design System team to Figma France.
We try to align Dev & Design, this is very… annoying.
Happens all the time on every component. So we create “fake boolean property” on the upper container.

It complexifies the property panel / API and requests designers to do stuff manually.

Hope it will come soon 🙂

Autumn_Dawe-Baillie
October 21, 2024

Just +1 ing this to keep it relevant and boost the request. The way this is working today doesn’t align with how it works in code and is causing confusion for our developers and designers.

Roman67
New Participant
October 22, 2024

This bug breaks my expectation of how Auto layout set to “Hug” should behave, and it forces me to implement a workaround when creating flexible components that can toggle layers on and off.

Bethany_Beech1
November 12, 2024

This is making design of layout components with collapsible sections 100x harder than it should be. Instead of simply hiding a top section and having it collapse/disappear completely, I now have to add complicated workarounds to get the layout to behave as it logically should-- not holding any space or padding if no layer in it is visible. Please fix this.

Yvette_O
New Participant
November 18, 2024

Does anyone have a hack/fix for this issue when using a negative gap for the items in the container that won’t collapse? The 0px fix doesn’t work.