nervetattoo / banner-card

A fluffy banner card for Home Assistant 🥰
MIT License
609 stars 57 forks source link

How to change font size of values? #142

Open herrzettpunkt opened 2 years ago

herrzettpunkt commented 2 years ago

I'd like to resize the text values since these are slightly taller than a toggle switch which results into to slightly taller banner card when one item has a text as value.

As the card_mod font size command works on other entity cards, the same command lines doesn't apply to the banner-card.

Any (other) suggestions to make the cards horizontally even?

Bildschirmfoto 2022-05-06 um 02 36 21
type: custom:banner-card
heading: Haushalt
row_size: 2
entities:
  - entity: sensor.waschmaschine_status
    name: Waschmaschine
    card_mod:
      style: |
        :host {
          font-size: 10px;
        }
  - entity: sensor.trockner_status
    name: Trockner
  - entity: sensor.waschmaschine_last_update
    name: seit
herrzettpunkt commented 2 years ago

141 this helped me to align the cards. But I still want to change the font size.

herrzettpunkt commented 2 years ago

I got it. If somebody has the same problem: The card-mod command has to be above the "entities".

But reducing the font size doesn't affect the vertical line between the items. If a row contains a text value, the line becomes taller than a line in a only toggle row.

In this screenshot you see a comparison between the two lines (the red line represents the tall line from above).

Bildschirmfoto 2022-05-06 um 03 29 36