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

    MichaelF
    New Participant
    Jun 5, 2023 11:52 AM UTC

    +1 agree, removing all content from an autolayout should collapse to zero, as it does in CSS.

    Martyn_Bowis
    Active Member
    Jun 6, 2023 4:19 AM UTC

    I don’t know Figma’s reasoning, but to me it makes sense not to collapse empty autolayout frames because if they become size 0 then it would be tedious to put things inside them.

    Why tedious if auto layouts collapse to zero? Easy from Layers tree.

    Jesse_Wallace
    New Participant
    Jun 8, 2023 5:14 PM UTC

    also having an issue with this trying to build extensible, reusable components. Absolute PITA.

    Pedro_Vinagre
    Jul 7, 2023 1:10 PM UTC

    Still no fix for this?
    It’s really annoying!

    For example, if you want to have a side by side supporting text and char count in a text field, one aligned left, the other aligned right, they can both live in the same horizontal space.
    But if I hide both of them, the space of the autolayout stays visible. It’s not always one or another, sometimes both need to be out from the component.

    JonnyA
    Jul 7, 2023 4:58 PM UTC

    I don’t understand, this should have been fixed along with the release of Wrapping and Min/Max Widths at Config, more CSS properties. If the goal is to have more parity with how layouts are handled in code, this should be addressed as soon as possible.

    Too painful to have to find a workaround and really detrimental to building robust and scalable design systems.

    Antoine
    AntoineAuthor
    Active Member
    Jul 10, 2023 7:58 AM UTC

    Thanks for the +1
    I changed the topic to a feature request to add weight to our complaints! Vote away

    verymoko
    New Member
    Aug 25, 2023 7:56 AM UTC

    +1. I expected that wrapper of hidden booleans also would be hidden.

    I’m glad, that you opened this topic.

    Peter_Pilat
    Sep 7, 2023 3:18 PM UTC

    Same here, would expect it to work the same way as CSS. Very difficult to create scalable and reasonable components.

    Frederic_Giroux
    New Participant
    Sep 26, 2023 7:11 PM UTC

    Hi Figma team, is this topic part of a possible update?

    OliverM
    Sep 26, 2023 9:56 PM UTC

    +1. Please fix. The current implementation is not very intuitive imo.