Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: mushroom-template-badge in the header doesn't take the font-family defined in themes.yaml #1612

Closed
3 tasks done
francesconazzaro opened this issue Dec 23, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@francesconazzaro
Copy link
Contributor

Requirements

  • I checked the troubleshooting section in the README to verify that I have the latest Mushroom version.
  • I did a search to see if there is a similar issue or if a pull request is open.
  • I have read the state of card mod support (in pin issues) and understand card mod support is not provided in this repository.

Current Behavior

I defined a custom theme in the themes folder with a custom font. I'll paste the content here

My Theme:
  primary-font-family: "Figtree"
  secondary-font-family: "Figtree"
  paper-font-common-base_-_font-family: "var(--primary-font-family)"
  paper-font-common-code_-_font-family: "var(--primary-font-family)"
  paper-font-body1_-_font-family: "var(--primary-font-family)"
  paper-font-subhead_-_font-family: "var(--primary-font-family)"
  paper-font-headline_-_font-family: "var(--primary-font-family)"
  paper-font-caption_-_font-family: "var(--primary-font-family)"
  paper-font-title_-_font-family: "var(--primary-font-family)"
  ha-card-header-font-family: "var(--primary-font-family)"

All the various cards take the new defined font-family except for the mushroom-template-badge in the header.
Here is a screenshot of a home assistant badge (left) and a mushroom-template-badge (right)
image
As you can see the left font-family is is Figtree as defined in the themes folder, the right font-family is the default Roboto.

Expected Behavior

I would expect to have a consistent font in the page as defined in the themes folder.

Steps To Reproduce

  1. Define a theme with a custom font like
My Theme:
  primary-font-family: "Figtree"
  secondary-font-family: "Figtree"
  paper-font-common-base_-_font-family: "var(--primary-font-family)"
  paper-font-common-code_-_font-family: "var(--primary-font-family)"
  paper-font-body1_-_font-family: "var(--primary-font-family)"
  paper-font-subhead_-_font-family: "var(--primary-font-family)"
  paper-font-headline_-_font-family: "var(--primary-font-family)"
  paper-font-caption_-_font-family: "var(--primary-font-family)"
  paper-font-title_-_font-family: "var(--primary-font-family)"
  ha-card-header-font-family: "var(--primary-font-family)"
  1. Activate the new theme
  2. Add a standard badge and a mushroom-template-badge to the dashboard
  3. Check that the font family is different

Context

YAML state

Environment

- Browser:
Arc Browser: 1.72.1
Google Chrome: 131.0.6778.205
Safari: 18.1.1
- HA Version:
Core: 2024.12.5
Supervisor: 2024.12.0
Operating System: 14.1
Frontend: 20241127.8
- Mushroom: v4.2.1

Anything else?

No response

@francesconazzaro francesconazzaro added the bug Something isn't working label Dec 23, 2024
@francesconazzaro francesconazzaro changed the title [Bug]: mushroom-template-badge in the header don't take the font-family defined in themes.yaml [Bug]: mushroom-template-badge in the header doesn't take the font-family defined in themes.yaml Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant