Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Horizontal button stack overlaying each other #52

Closed
dnestico opened this issue Sep 14, 2023 · 5 comments
Closed

Horizontal button stack overlaying each other #52

dnestico opened this issue Sep 14, 2023 · 5 comments

Comments

@dnestico
Copy link

I don't know why this is happening I've tried clearing my browser cache and still but for some reason the buttons are overlaying each other when I add more than 2 and it looks like this. Please help.

Screenshot 2023-09-14 at 4 50 05 PM
type: custom:bubble-card
card_type: horizontal-buttons-stack
1_name: Davids Room
1_icon: hue:downstairs
1_entity: light.basement_lights
2_name: V/E Room
2_icon: hue:upstairs
2_entity: light.vally_esthers_room
3_name: Media
3_icon: mdi:music-circle
style: |
  ha-card {
    margin-bottom: 62px !important;
@Clooos
Copy link
Owner

Clooos commented Sep 15, 2023

Have you tried going in edit mode since? Because when you are in this mode the size of the buttons is automatically calculated and saved in your cache, this is needed for the auto order feature. So indeed clearing your cache will always do that, but I will try to find a way to fix that.

@dnestico
Copy link
Author

Yea this screenshot was out of edit mode, I even made new button stack but it seems to always happen its very weird. Would love it resolved so I can use it!

@Clooos
Copy link
Owner

Clooos commented Sep 15, 2023

I've just tried your code and you just need to add links to fix this. But thanks for finding this issue, I will add an error if no link is added.

This is working:

type: custom:bubble-card
card_type: horizontal-buttons-stack
1_name: Davids Room
1_icon: hue:downstairs
1_link: '#davids_room'
1_entity: light.basement_lights
2_name: V/E Room
2_icon: hue:upstairs
2_link: '#ve_room'
2_entity: light.vally_esthers_room
3_name: Media
3_icon: mdi:music-circle
3_link: '#media'
style: |
  ha-card {
    margin-bottom: 62px !important;
  }

@Clooos Clooos closed this as completed Sep 15, 2023
@dnestico
Copy link
Author

Genius, that did indeed fix it!

Now is it possible to remove the black shadow/background with card mod btw? Thanks

@Clooos
Copy link
Owner

Clooos commented Sep 16, 2023

Just add this, you don't even need card-mod :

styles: |
  .horizontal-buttons-stack::before {
    display: none !important;
  }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants