Card-mod change - Bug in 2025.05

Hello, after installation of 2025.05 my cards changes size.
If you look at the picture you will see the size height of the cards increased, and the text, run out of the box. Like Garten, and 14.4

  1. is this a known bug and it will be changed again, or
  2. Do I have to change something in my css as it will stay this way.
    3.I allready tryed to solve the issue with margin and padding, but my knowledge is not sufficient, as my programming stopped with Shell.

type: vertical-stack
cards:
  - type: horizontal-stack
    cards:
      - type: markdown
        content: <center> <font size=3>Wohnzimmer </font>
        card_mod:
          style: |
            ha-card {
            height: 50px !important;
            } 
  - type: horizontal-stack
    cards:
      - type: markdown
        content: >-
          <center> <font size = '7'> {{ states
          ('sensor.homatic_wohnzimmertemperatursensor_temperature')}}</font>
          </center>
        card_mod:
          style: |
            ha-card {
              width: 120%;
              height: 80px !important;
              margin: 0px !important;
              padding: 0px 0px 5px 0px;
              } 
      - type: markdown
        content: >-
          <center> <font size = '7'> {{ states
          ('sensor.homatic_wohnzimmertemperatursensor_humidity')}}%</font>
        card_mod:
          style: |
            ha-card {
              width: 120%; 
              height: 80px !important;
              }   
      - type: markdown
        content: >-
          <center> <font size = 6> {{ state_attr ('climate.homatic_wohnzimmer',
          'temperature')}}</font>
        card_mod:
          style: |
            ha-card {
              width: 100%; 
              height: 80px !important;
              } 
  - type: markdown
    content: <center> <font size=6>Garten </font>
    card_mod:
      style: |
        ha-card {
        height: 50px !important;
        } 
  - type: horizontal-stack
    cards:
      - type: markdown
        content: |-
          <center> <font size = '8'> {{ states
           ('sensor.homatic_gartentemperatuffuhler_temperature') }} </font>
      - type: markdown
        content: |-
          <center> <font size = '8'> {{ states
           ('sensor.homatic_gartentemperatuffuhler_humidity') }} %  </font>
  - type: horizontal-stack
    cards:
      - type: markdown
        content: |-
          <center> <font size = '8'> {{ states
           ('sensor.homatic_temperature_sensor_2_external_delta_channel_2_temperature') }}</font>
      - type: markdown
        content: |-
          <center> <font size = '8'> {{ states
           ('sensor.homatic_temperature_sensor_2_external_delta_channel_1_temperature') }}</font>
        card_mod:
          style: |
            ha-card {
              background-color: rgb(0, 0, 100);
            }
  - type: markdown
    content: <center> <font size=6>Keller </font>
    card_mod:
      style: |
        ha-card {
        height: 50px !important;
        } 
  - type: horizontal-stack
    cards:
      - type: markdown
        content: >
          <center> <font size = 8'> {{ states
          ('sensor.homatic_kellertemperatur_temperature') }} </font>
      - type: markdown
        content: >
          <center> <font size = 8'> {{ states
          ('sensor.homatic_kellertemperatur_humidity') }} %  </font>
1 Like

Hello Frank65,

My guess is this is your problem, The first one in this section.

These are not card-mod changes in 2025.5.
Same may be replicated without card-mod, just specify titles in horizontal stacks.
Old issue registered in GitHub.

1 Like

I’ve noticed the same problem with default hui-button-card. They seem to have added a margin above the text, which makes my buttons all larger and breaks my layout. I can fix it, per button, with card-mod, but for now I’ve reverted to 2025.4.2 to see if they fix it properly. Surely wasted space is a waste of space :slight_smile:

1 Like

I also went Bach to 2025.4.4 as I was not able to resize it

1 Like

A word from the team about wether this will get fixed or stay this way would be nice.
Not looking forward to changing all of my yaml dashboards if this will change again.

4 Likes

For me the option in the layout grid card that controls the padding made the card correct again. Change it to 0px

@lieuwedh thank you for that info , do you have an example for someone who is happy to spell css, thanks frank

Can anybody please help here with a hint how to proceed.
Will that be changed again, is this a bug in 2025.05 or is this the tun back of a bug before. Shall we wait or will this stay forever. Thanks Frank

Hi, I found a workaround, using # for headline and the font-size in card-mod which has more possibilities to adjust, the problem still exists, but it is usable now.

Please edit your post to fix a formatting. A code should be placed inside triple backticks.

No chance to make that on the iPad

Hold down the single quote button and choose the far left option.

Or use a “preformatted text” in a cog menu.

If anyone is still having issues, there’s a HTML card in HACS that works very well, I just got it yesterday and thought I’d tell people as it allows for proper HTML with, of course, the <style> tag.