Empty horizontal-stack results in a gap

I really like the new improvements with cards filling out space. It works great execpt for one part where I have a horizontal stack that only has conditional stacks. When empty it results in an extra white space. Someone knows how to fix it?

This is the card that is empty in the picture.

          - type: horizontal-stack
            cards:
            - type: conditional
              conditions:
                - entity: binary_sensor.you_have_mail
                  state: 'on'
              card:
                type: entity-button
                entity: binary_sensor.you_have_mail
                icon: mdi:email
                name: You have mail

            - type: conditional
              conditions:
                - entity: group.all_plants
                  state: 'problem'
                - entity: sensor.all_plant_status_moisture
                  state: 'off'
              card:
                type: entity-button
                entity: group.all_plants
                icon: mdi:flower-tulip
                name: Check the flowers
                tap_action:
                  action: call-service
                  service: input_boolean.turn_on
                  service_data:
                    entity_id: input_boolean.mute_flowers

are you sure that it’s because of conditions cards?
have you tried toreplace them with normal cards and see of the gap remains there?

Hi!

If I “unhide” all cards the gap goes away. I realized I forgot that I also have an empty vertical stack in the picture above.

See attached image with one card per stack unhidden. No Gap.

tbh I can see gaps everywhere and imho that’s the way stacks work.
or you use the word gap differently.
could you highlight it somehow on your screenshot?

Sorry about the disambiguate.

The distance between red arrows is larger than between the green ones.
The empty stacks create an extended distance between the cards.

well, don’t know what to say.
you can try converting your cards into normal ones and adding display: none to their style if they are not needed using card-mod.
or try alternative layout solutions like custom:stack-in-card or custom:layout-card.