Word wrap long text in glance card

Hi guys
I have created a glance card but texts are truncated. Is it possible to overwrite the style (overflow and white-space)?

I have tried this but have not been successful:

      - type: glance
        title: Escenas
        show_name: true
        show_state: false
        style: |
          .name {
            overflow: unset;
            white-space: unset;



word-wrap: normal

It dos not work. The problem is that it does not overwrite the CSS style

Not even this?

word-wrap: normal !important

Unfortunately it doesn’t work. Don’t overwrite the “name” class

The glance card does not have a style property, so this cannot work ever (without custom cards)? You can set a dedicated theme for the card though, but I don’t think you can impact the wrapping with that.

A “workaround”: Define shorter names in the glance card per entity.

I’m sorry I didn’t say so, I’m using lovelace-card-mod by Thomas Loven

I assumed you were.

What is that workaround? Could you define an example?

type: glance
  - entity: timer.timertest
    name: Shorty

Now “Shorty” will be shown instead of the entity name.

I also haven’t found a solution to that and would really appreciate possibility to override this style

Do you mean this?

Look here

1 Like