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

Use tile style as default style for mushroom card #1348

Merged
merged 1 commit into from
Jan 31, 2024
Merged

Conversation

piitaya
Copy link
Owner

@piitaya piitaya commented Jan 31, 2024

Description

Use same font style as tile card
Use same color code as tile card
Use same icon size as tile card

All these variables are still editable using themes.

Related Issue

Fixes part of issue : #1259

This PR fixes or closes issue: fixes #

Motivation and Context

How Has This Been Tested

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)
  • ⚠️ 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 piitaya merged commit dec2df8 into main Jan 31, 2024
2 checks passed
@piitaya piitaya added the enhancement New feature or request label Jan 31, 2024
@robertboccia
Copy link

Seems to have effected card mod, using primary-text-color has stopped working

@SupiTrobi
Copy link

Can confirmthat. Same effect on my side.

@piitaya
Copy link
Owner Author

piitaya commented Feb 2, 2024

You have to use --card-secondary-color and --card-primary-color to color the text after the update.

@SupiTrobi
Copy link

Thx for the info

@SupiTrobi
Copy link

SupiTrobi commented Feb 2, 2024

To make it more precise to others using card_mod
OLD (not working)

mushroom-state-info$: |
  .container {
   --card-secondary-font-size: 30px;
   --card-primary-font-size: 20px;
   --primary-text-color: orange;
   --secondary-text-color: red;
  }

NEW:

ha-card {
    --card-primary-color: red;
    --card-secondary-color: yellow;
    --card-primary-font-size: 50px;
    --card-secondary-font-size: 15px;
}

Also found just out that text-align: center; needs to go there as well.

@dnestico
Copy link

NEW:

ha-card {
    --card-primary-color: red;
    --card-secondary-color: yellow;
    --card-primary-font-size: 50px;
    --card-secondary-font-size: 15px;
}

I know this issue is closed but this isn't working for me with the mushroom title card

      - type: custom:mushroom-title-card
        title: |
          Now playing {{states.sensor.davidnestico_status.attributes.name}}
        subtitle: |
          {{states.sensor.davidnestico_status.attributes.content_rating}}
        card_mod:
          style: |
            ha-card {
              --card-primary-color: black;
              --card-secondary-color: grey;
            }

@piitaya
Copy link
Owner Author

piitaya commented Jul 18, 2024

This workaround is for regular cards, not for title card.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants