Font-size: once again :(

Hello,

Get stuck with changing font size in dashboard cards. Installed card-mod and mushroom cards. I’m able to change icon color but can’t apply any change to text :frowning:

My code:

 - type: entity
    entity: sensor.do_sss
    icon: mdi:bottle-soda-classic
    card_mod:
      styles: |
        { 
          font-size: 30px !important;
        }

Also read that it’s not possible to apply card-mod in grid. Is there a way to change font size in gridded cards?

Also tried to set it as:

  - type: entity
    entity: sensor.do_sss
    icon: mdi:bottle-soda-classic
    card_mod:
      styles: |
        { 
          --chip-font-size: 1em
        }

still no luck

You need style: | not styles: | and each card will need different code.

type: custom:mushroom-chips-card
chips:
  - type: entity
    entity: sensor.do_sss
    icon: mdi:bottle-soda-classic
    card_mod:
      style: |
        ha-card {
         --chip-font-size: 20px;
          }
1 Like

Thanks! I’ve simplified case and succeed. The main problem as I see for now is to find correct style that need to be altered. Start digging into developer mode :slight_smile:

Working code

views:
  - title: Home
    cards:
      - type: entities
        entities:
          - entity: sensor.time
            card_mod:
              style: |
                :host {
                  font-size: 64px;
                }

this is a misleading solution. from the screenshot you provided your trying to change the font size of mushroom chips card.
that solution was posted above.
sorry but it can be confusing for new members who actually use the search bar to then find this topic.

2 Likes

changed Solution that was provided by LiQuid_cOOled. It works.

1 Like