Help: Can't change font on custom card-mod

I am trying to change the font of these entities output of the words ‘OPEN’ and ‘DOCKED’ as shown in the image.

Screenshot 2022-06-29 060532

Here is my configuration for the card

type: custom:mod-card
card:
  type: horizontal-stack
  cards:
    - type: entity
      entity: binary_sensor.window_sensor
      name: Windows
    - type: entity
      entity: vacuum.roborock_s4_max
      name: Vacuum
card_mod:
  style: |
    ha-card {
      --ha-card-font-size: 1px !important;
     height: 100px !important;
    }

I tried changing the –ha-card-font-size: 1px !important; but the font OPEN and DOCKED doesn’t change. More info. about my setup is running home assistant core on a raspberry pi and on Home Assistant Core 2022.6.7

Does anyone know how to change the font of the two words? Thank you

stacks are painful to adjust as they don’t really have a panel with properties. It’s much easier to put the style on each entity_card. Otherwise, you have to come up with the correct selector.

Thanks for the suggestion. I managed to change the font size by separating each entity like you suggested (i.e. moving them out of the horizontal stack), but as a result, the entities weren’t horizontally stacked anymore.

I did figure out that button cards have smaller font size than entity cards, so I managed to get the font size smaller while still having them horizontally stacked. This way my cards fit nicely on my dashboard.

image

Better to ask card-mod questions in a dedicated card-mod thread.
It also has examples which you may find useful: 1st post → link at the bottom.

Probably you misunderstood.
You do not need to remove cards from a stack.
To style cards in a stack - use card-mod inside every card.
Using mod-card for the whole stack is required to style the stack itself.

You may style Entity card as you wish - use examples mentioned above.