Skip to content

Conversation

francesconazzaro
Copy link
Contributor

Description

Related Issue

This PR closes issue: #1612

Motivation and Context

The mushroom-template-badge doesn't use the same font-family as the home assistant badges. The current behaviour is described here #1612.

How Has This Been Tested

  • I've started a test environment following the proper section in the README.
  • I've created a custom theme by adding themes/my_theme/my_theme.yaml in the .hass_dev folder and changing the font. The content of the file is:
My Theme:
  ha-card-box-shadow: 0px 2px 4px 0px rgba(0,0,0,0.16)
  ha-card-border-width: 0

  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)"

I've added a mushroom-template-badge and a standard badge to a dashboard and checked that both the badges had the same new font.
image

Types of changes

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • 🚀 New feature (non-breaking change which adds functionality)
  • 🌎 Translation (addition or update a translation)
  • ⚙️ Tech (code style improvement, performance improvement or dependencies bump)
  • 📚 Documentation (fix or addition in the documentation)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have tested the change locally.
  • I followed the steps if I add a new language .

@piitaya
Copy link
Owner

piitaya commented Jan 4, 2025

Hi 👋 Thank you !
Maybe removing the font-family property can be enough to fix that issue? (Same as this PR : home-assistant/frontend#23120)

@piitaya piitaya added the bug Something isn't working label Jan 4, 2025
@francesconazzaro
Copy link
Contributor Author

yes, this addresses the same feature, I will close this PR. Thank you!

@piitaya
Copy link
Owner

piitaya commented Jan 7, 2025

@francesconazzaro Do you want to re-open the PR or re-create the PR for the fix or should I do it? (The font-family line should be removed in Mushroom too)

@francesconazzaro
Copy link
Contributor Author

yes you're right, I overlooked your link and I thought that it was already done by a different PR. I will re-open the PR with the correct fix

@francesconazzaro
Copy link
Contributor Author

I've tested this change in my home assistant installation using HA OS.

@piitaya
Copy link
Owner

piitaya commented Jan 7, 2025

Thank you 🙂

@piitaya piitaya merged commit f1fd2ee into piitaya:main Jan 7, 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

Successfully merging this pull request may close these issues.

2 participants