MelleD / lovelace-expander-card

Expander card for HomeAssistant
Apache License 2.0
23 stars 4 forks source link

[Request] More exact placement of expander button when overlaying #174

Closed KairuByte closed 2 weeks ago

KairuByte commented 2 weeks ago

Is your feature request related to a problem? Please describe. Currently, you are given the option of having the button to the right, and the title card being slimmed and shoved to the side, or to overlay the title card with a full margin parameter. You cant set the margin independently. This doesn't work well for cards that have a button in that position already, such as the thermostat card.

Describe the solution you'd like It would make much more sense to allow top/right margins to be set independently. Maybe even choose the initial corner, and set all margins.

Describe alternatives you've considered 3em works for the thermostat card, but it's kinda jank: image

MelleD commented 2 weeks ago

Hey @KairuByte,

I'm unsure whether it's really a problem with the expander card or rather with the thermostat card or do you know expander cards where the arrow is not at the top right? Do you have an example?

Two solutions come to mind off the top of my head a) Don't use title-card-button-overlay: true b) Use card mod

        card_mod:
          style: |
            .header {
              margin-top: 30px !important;
            }

Bildschirmfoto 2024-06-19 um 08 41 30

Personally I would move the burger menu to the left (maybe also card mod) and leave the arrow at the top right

KairuByte commented 2 weeks ago

a) Looks really funky, if the card was much smaller I'd agree this wouldn't be a horrible solution though. This is what that looks like in this case: image b) is an option I suppose, I do actually use card mod in other places, but I normally turn to it as a last resort, considering the breaking changes that have happened in the past.

I suppose I can go with card mod in this case, so I'll close this.

MelleD commented 2 weeks ago

Yes the thermostat card looks not that is a good candidate for a overlay card ;).

I have only good experience with the mushroom cards for overlay title card… And the bigger cards than in the content. So maybe try as overlay the mushroom climate card

KairuByte commented 2 weeks ago

Eh, card-mod covered the situation fine.