select-list-card icon indicating copy to clipboard operation
select-list-card copied to clipboard

Add support for card-mod, in order to customize font-size, or set font-size directly

Open nagyrobi opened this issue 4 years ago • 5 comments

Hi! Great card. Using card-mod, I'm trying to reduce font size in the list:

style: |
  ha-card {
    font-size: 10px;
  }

But it doesn't have any effect. However in your list with tracks I see smaller fonts, how did you do it?

nagyrobi avatar Jul 18 '20 11:07 nagyrobi

Thanks!

I don't alter the font-size of the items so I guess it's the default font-size.

Using card-mod I successfully can change the font-size by using:

style: |
  paper-item {
    font-size: 10px;
  }

mattieha avatar Jul 20 '20 14:07 mattieha

Cool, thanks. What parameter should I change to decrease the height of a line?

nagyrobi avatar Jul 20 '20 20:07 nagyrobi

I'm not at my pc right now, I guess the height and line-height properties of the paper-item.

Since I use a hardcoded value to calculate height for the overflow this will give issues when you alter the height via card-mod.

Maybey I'll make css variable for it, otherwise a config option.

mattieha avatar Jul 21 '20 17:07 mattieha

That would be so cool.

nagyrobi avatar Jul 21 '20 17:07 nagyrobi

Just a quick note from the latest HA release:

The theme variable paper-card-background-color is removed. You can use ha-card-background or card-background-color as a replacement. In general, all variables that start with paper will be removed at some point.

nagyrobi avatar Jul 24 '20 08:07 nagyrobi