Card-mod selector syntax

Newbie question here. I am trying to style a card-mod. The code below works for my card, changing the color of all text inside:

card_mod:
style: |
   :host {
      color: yellow;
   }

But I want to be more specific, like this (doesn’t work):

card_mod:
style: |
   .myClassName {
      color: yellow;
   }
   h1 { ... }
   h1.anotherClassName { ... }

What am I missing? I read the docs and tried some variations of “$” and so, without success. I didn’t understand.

Thank you.

Search the card-mod thread and take the link to the great examples in the first post from Ildar.

1 Like

Can someone please share that link here? I can’t find the the thread @arganto mentioned or any resources documenting the specific selector syntax that card-mod uses.

I was able to find most of the info I need in the lovelace-card-mod readme (usage section):

You are asking for this link?