rianadon/timer-bar-card

Mushroom theme changes

jhemak opened this issue · 8 comments

Following recent updates to the Mushroom cards, the font weight of timer bar card in Mushroom mode no longer matches. The Name and time remaining both appear more bold than the primary and secondary text on all other mushroom cards.

I was able to use card_mod as a workaround until you are able to update the source code (wish I knew how to do that to help you out!)

card_mod:
    style: |
      ha-card {
        --card-primary-font-weight: var(--mush-card-primary-font-weight, 500);
        --card-secondary-font-weight: var(--mush-card-secondary-font-weight, 400);
        --secondary-text-color: var(--mush-card-secondary-color, var(--primary-text-color));
      }

Thanks for this! I'll take a look when I have some time.
Looks like the mushroom cards and Home Assistant tile cards might finally have consistent font weights?

To add to this (at least I think it's related), certain customization options also seem to have broken, at least when using the mushroom style in horizontal mode. For example:

type: custom:timer-bar-card
entity: timer.was
bar_width: 50%
mushroom:
  layout: vertical

Gives this card:
image

But when using this configuration:

type: custom:timer-bar-card
entity: timer.was
bar_width: 50%
mushroom:
  layout: horizontal

It results in this layout:
image

I seem to get similar issues when using the bar_radius option, and bar_height made the bar completely dissapear even. Same when using layout: hide_name.

(Accidentally posted this before fully considering. Apparently ctrl + enter is a shortcut for posting...)
If it's better I can also open a new issue for this, but I have a suspicion this is also related to recent mushroom updates.

EDIT: Just noticed a similar issue is already mentioned in #115 (if less extensive)

As you found in #115, I don't think bar_width was ever something that worked with the mushroom layout. text_width is what you should use to give the time left some more room to breath.

Please do open a new one for bar_radius and bar_height. I'm surprised that layout: hide_name even changes anything. It was not my intention for layout to be a usable option with mushroom cards.

I was opening the issue and playing around with the config, but it seems like it may have been the card preview not updating? I wasn't able to replicate it at least, and I've had issues with that before. I thought I saved them though, but alas.

Fixed in c811ed0.

Thanks!! Did you possibly miss one change? Maybe I am wrong, but I think the secondary font color in your latest version still does not match current mushroom. When I use this via cardmod it seems to match:

--secondary-text-color: var(--mush-card-secondary-color, var(--primary-text-color));

Thanks for catching that. It looks like there were a few more styles I needed to update. It should be fixed with the new release.

Looks good now! Thanks again!