Nerwyn / android-tv-card

A completely customizable universal remote card for Home Assistant. Supports multiple platforms out of the box.
Apache License 2.0
232 stars 12 forks source link

Changing title style #68

Closed eyalmichon closed 6 months ago

eyalmichon commented 6 months ago

Is your feature request related to a problem? Please describe. When enabling title, it takes a big space to include it.

Describe the solution you'd like To be able to control the height of this section and font size, etc, or even hide the title based on a state I want this because I use a state to control showing the actual controls.

Note: While writing this I actually figured that I could just use the following to do what I want: title: >- iif(is_state(“media_player.tv”, “on”), “null” ,TV”)

Nerwyn commented 6 months ago

The title does support templating (via ha-nunjucks, like everything else in this card), but the title itself is a Home Assistant card feature that I don't have control over style wise. To change it's style you'd have to use card-mod, like so:

card_mod:
  style:
    $: |
      .card-header {
        --ha-card-header-color: red;
        padding: 0px 12px !important;
      }

card-mod also supports templating (via Home Assistant's backend, so it's slower but more fully featured) so you can also include templates for changing color and size there.