Clooos / Bubble-Card

Bubble Card is a minimalist card collection for Home Assistant with a nice pop-up touch.
MIT License
2k stars 58 forks source link

The style settings of the popup card globally affect some objects in HA. #899

Closed sallyHADEV closed 2 weeks ago

sallyHADEV commented 2 weeks ago

When using the following code from the example in the popup card, these settings affect not only the card but also other objects.

styles: |-
      * { 
      color: red !important;
      }

To reproduce, create an empty dashboard and insert the following popup card.

type: vertical-stack
cards:
  - type: custom:bubble-card
    card_type: pop-up
    entity: update.home_assistant_supervisor_update
    styles: |-
      * { 
      color: red !important;
      }
    hash: "#test"

스크린샷 2024-11-02 131137 스크린샷 2024-11-02 131241

1

I’m currently using alternative code like .bubble-name.

Clooos commented 2 weeks ago

Wow, weird 😅 I will try that.

Clooos commented 2 weeks ago

Indeed I was able to reproduce it, but I don't think that I can fix that in an easy way, instead use the element class directly.

This is working correctly:

.bubble-pop-up * { 
  color: red !important;
}
sallyHADEV commented 2 weeks ago

Thank you for your answer. I understand. I will use this code from now on